[Gtk-sharp-list] IDisposable

Michael Meeks michael@ximian.com
04 Sep 2002 14:32:33 +0100


Hi Mike,

On Wed, 2002-09-04 at 06:50, Mike Kestner wrote:
> If anyone detects major brokeness with the resulting behavior, don't be
> bashful. 

	I don't quite understand what you're proposing; but here's how it
should work IMHO [ YMMV etc. ].

	When you invoke IDispose's dispose method it should map to:

	g_object_run_dispose (proxy);

	For a GObject and

	gtk_object_destroy (proxy)

	for a GtkObject. The semantic difference being small.
	
	Since GObject was designed for garbage collection / disposal in this
way, I would leave it's reference count untouched; either keeping 1
reference to it - or ref/decing it as you pass it around.

	Otherwise you'll have major problems; the sound of poking with the
underlying ref count is pretty ugly indeed [ but perhaps I
mis-understood you ].

	HTH,

		Michael.

-- 
 mmeeks@gnu.org  <><, Pseudo Engineer, itinerant idiot