Glade and memory
| From: | Andrew Smith | Date: | Wed, 05 Feb 2003 10:17:56 +0000 |
| Subject: | Glade and memory | ||
| References: | 1 2 3 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-3009@lists.php.net to get a copy of this message | ||
I am using Glade on a Windows platform to build a fairly complicated program
that is starting to increase in size with many functions and thousands of
lines of code.
As a general rule of thumb, is it better to use get_widget once and assign
the item to a global variable, or should I just use get_widget in each
function that needs to access the widget?
Does anyone know the implicationes of each option? Presumably using a global
variable means more memory is used, but calling get_widget is probably
slightly slower.
If you assign a widget to a variable but don't declare the variable global,
is the memory released at the end of the function?
Thanks everyone!
--------------------------------------
Andrew Smith
The Blue Box Cape Town
http://www.bluebox.co.za
andrew@bluebox.co.za
021 683 6017 / 083 659 6106