Re: Destroying a window



On Tue, Mar 12, 2002 at 11:40:46AM +0100, zze-coframi balr001 wrote:
Hello,

I've got an application where I create two windows. When I destroy one, the
memory that is used by this window is not freed although calling
gtk_widget_destroy fot that window. I see the memory I used looking at
"top".

Can anyone tell me why the memory used by my second window is not freed when
I call gtk_widget_destroy for that window ??

thanks a lot

(I am using GTK.1.3.13.) 

Isabelle

---end quoted text---

Since gtk is based on glib, it calls g_malloc() instead malloc() directly.
When you alloc with g_malloc(), you have to free with g_free()..
So, why use these functions?
Becose the memory allocated is cached, and when you call g_malloc() again it dosn't make the system loose 
time again allocing your page..
Hope I helped.. :)

[]'s
-- 
Marcelo R Leitner <mrl netbank com br>
ICQ #: 29966851



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