[9661] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: memory maintence in gtk
daemon@ATHENA.MIT.EDU (Scott Stone)
Thu Oct 29 23:44:44 1998
Date: Fri, 30 Oct 1998 13:44:46 +0900 (JST)
From: Scott Stone <sstone@ume.pht.co.jp>
To: gtk-list@redhat.com
In-Reply-To: <Pine.GSO.3.96.981029203413.17275A-100000@well.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
On Thu, 29 Oct 1998, Todd Gureckis wrote:
>
> When you create a dialog window to say, set preference for a application,
> is it necessary/customary to free all the memory allocated by the creation
> of the window once it is closed... for example running free() on all
> the GtkWidget pointers in the dialog window?
>
> Is there a built in way to do this in gtk? This is a kind of un-informed
> observation, but when i create a dialog, then later gtk_widget_destroy()
> the dialog, the memory size of my application does not shrink when I list
> it in top. I wasn't sure if it would be better to save the memory,
> and dynamically allocate the whole dialog window, or leave it in memory,
> so cpu is saved the next time the dialog window is created.
>
> any suggestion/answers would be appreciated,
gtk_widget_destroy() frees the window and all of its children.
--------------------------------------------------
Scott M. Stone <sstone@pht.com, sstone@pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null