mono/gtk-sharp — pull request #32 by bl8 (2011-12-04 21:54:22+00:00)
Title: Object: Fix ToggleRef disposing when we're being finalized

We should not try to dispose our ToggleRef when Dispose(bool) has been
called by the finalizer, because we should not reference any managed
objects.

Set and check the disposed flag inside of Dispose(bool) so that it's
also done when the object is finalized.

Also clear up a confusion between a local ToggleRef variable in Dispose
and the ToggleRef member field.

A close inspection is needed on this one, to double-check that I'm not introducing any leak...