[Gtk-sharp-list] Disposing a Gtk.FileSelection causes a crash

Martin Baulig martin@gnome.org
11 Mar 2003 21:06:44 +0100


Miguel de Icaza <miguel@ximian.com> writes:

> I asked about this on the Gtk+ channel, and here are the answers:
> 
> 	* You do not "own" the toplevel window objects, those are
> 	  owned by Gtk.
> 
> 	* For those objects we should call `gtk_object_destroy' instead
> 	  of unref.
> 
> 	* JamesH suggested instead that we g_object_ref the return value
> 	  of gtk_file_selection_new inside gtk#
> 
> So Martin, in Gtk#, what kind of object is giving you this problem, so
> we can correctly address this?

Hi,

it's the Gtk.FileSelection.

Basically, I'm doing

        Gtk.FileSelection fs = new Gtk.FileSelection ("Open Source File");
        // do something with it
        fs.Destroy ();

-- 
Martin Baulig
martin@gnome.org
martin@ximian.com