Re: Destroying a window
- From: Martyn Russell <jackrussell subdimension com>
- To: Mailing "list GTK+ (E-mail)" <gtk-app-devel-list gnome org>
- Subject: Re: Destroying a window
- Date: 12 Mar 2002 18:11:05 +0000
On Tue, 2002-03-12 at 18:03, mrl netbank com br wrote:
On Tue, Mar 12, 2002 at 05:53:15PM +0000, Martyn Russell wrote:
On Tue, 2002-03-12 at 17:07, mrl netbank com br wrote:
On Tue, Mar 12, 2002 at 05:06:57PM +0100, zze-coframi balr001 wrote:
I only create GtkWidget objects. I don't make g_malloc.
---end quoted text---
Yes, but how do you create it? Using gtk_window_new(..), don't you?
If yes, you're calling g_malloc indirectly.. :)
In that case, how do you INDIRECTLY free it? seeing as you done have
access to the mem?? or if you do which mem is it your suposed to clear?
---end quoted text---
Well.. I didn't understand what you realy wants, but I'll try.. :)
when the window reference count gets 0, it's free'd using g_free(..)..
so the memory it was using is cached by glib, and the next call to g_malloc(..)
will probably use it again, hiding this from the kernel..
If you realy need to free(..) the memory, you'll need to deal with glib internals..
from what I know, it would be easier g_free(..) (what gtk_.._unref() will do for you) and then, with the
same pointer, free(..).. but be careful, you still have to remove this memory space from the glib's cache..
Was that you wanted?
I knew thought that gtk_widget_unref() should be called before
gtk_widget_destroy(). but for some reason it wasnt actually freeing the
memory. What glib function would be called to remove this object from
its cache??
[]'s
--
Marcelo R Leitner <mrl netbank com br>
ICQ #: 29966851
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]