Re: [gtk-list] memory maintence in gtk



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)




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