[Glade-users] [glade-users] Using a global variablefor GladeXML object?
- From: tvb at gnome.org (Tristan Van Berkom)
- Subject: [Glade-users] [glade-users] Using a global variablefor GladeXML object?
- Date: Sat, 20 Jan 2007 01:46:11 -0500
On Fri, 2007-01-19 at 12:03 -0600, Alexey Kurochkin wrote:
I could be wrong, but I believe the GladeXML object is still there, even
if you aren't referencing it no more, until the last widget created by
it is destroyed; and you can get the reference back with
glade_get_widget_tree function. Am I wrong?
Yes. glade_xml_new() returns an object that belongs to the caller -
it creates a gtk+ heirarchy on behalf of the user. It does not keep
references to the widgets it created (it catches the "destroy" signal
to ensure its name_hash stays valid) furthermore, after freeing your
GladeXML object it is safe to call glade_get_widget_tree() on a widget
built by the freed GladeXML - glade_get_widget_tree() will return NULL.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]