GTK+ and memory allocation
- From: joshua rh comcast net
- To: Gnome List <gtk-list gnome org>
- Subject: GTK+ and memory allocation
- Date: Sun, 28 Jun 2009 18:20:51 +0000 (UTC)
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+?
Thanks for your time,
Josh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]