zeromq/clrzmq — pull request #79 by XMbIPEK (2012-07-21 13:57:36+00:00)
Title: Fix garbage collected delegate exception.

John, i found a problem.

I got **NullReferenceException** when use monitor.
Visual studio says: A call has been made on a garbage collected delegate.
To fix this **ContextProxy** should keep reference to the callback delegate.

Here is a similar discussion on [msdn](http://social.msdn.microsoft.com/Forums/en-US/clr/thread/a04b7a0e-5994-4fef-a4b5-790d081804b8/) and [stackoverflow](http://stackoverflow.com/questions/6193711/call-has-been-made-on-garbage-collected-delegate-in-c).

It can be easely reproduced: by adding **GC.Collect()** right after **Context.CreateMonitor()** call.

Should I provide a test scenario for this case?