Re: GTK+ and memory allocation



On Sun, 28 Jun 2009 18:20:51 +0000 (UTC)
joshua rh comcast net wrote:
> Hello, 
> Since I've started gtk+ I've been wondering what happens to all the
> windows and stuff you don't explicitly destroy, do you need to
> destroy it? does gtk_main_quit do it for you? Sometimes I've been
> told to use g_free on things and I know if you make things
> non-pointers they get destroyed when they go out of scope. What about
> this: 
> 
> GtkWidget widget; 
> 
> &widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); 
> 
> is the space originally allocated to widget lost and replaced by that
> returned from gtk_window_new? 
> 
> and what if you have this: 
> 
> GtkWidget *widget; 
> 
> widget = gtk_window_new(GTK_WINDOW_TOPLEVEL); 
> 
> and you reach the end of it's scope (this was my original question),
> does it get destroyed by gtk+? 

Read
http://library.gnome.org/devel/gtk/stable/GtkObject.html#GtkObject.description

Chris



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]