Re: GTK+ and memory allocation
- From: Chris Vine <chris cvine freeserve co uk>
- To: joshua rh comcast net
- Cc: Gnome List <gtk-list gnome org>
- Subject: Re: GTK+ and memory allocation
- Date: Sun, 28 Jun 2009 21:05:01 +0100
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]