Re: allocated memory



Allocated memory used by Gtk+ allocation is freed automatically, unless you are
using a struct that you allocate yourself. ie

GtkWidget *my_widget = some_widget_new();
when this widget is destroyed or its parent, its allocated mem is freed
automatically but if you have a 

typedef struct {

GtkWidget *my_widget1;
GtkWidget *my_widget2;
someo ther things;
}my_struct;

and you destroy the widgets in the struct - you have to free the struct memory
itself.

so if you used g_new0 to initlize and allocate the struct, you'd have to
g_free() it afterwards even if you destroy the widgets.

Maher


On Wed, 22 Nov 2000 22:38:57 +0100, ASF said:

>     Hello,
>  
>  How can I freed the memory used by widgets because it seems to me that
>  it is not automatically done?
>  
>  thanks in advance,
>  
>  ASF
>  
>  
>  _______________________________________________
>  gtk-list mailing list
>  gtk-list gnome org
>  http://mail.gnome.org/mailman/listinfo/gtk-list
>  
>  

-- 
muhri muhri net -- http://www.muhri.net





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