Re: Completely remove a GtkWidget from Memory
- From: Tristan Van Berkom <vantr touchtunes com>
- To: Christian Schneider <christian_schneider_2000 yahoo de>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Completely remove a GtkWidget from Memory
- Date: Fri, 08 Aug 2003 09:31:52 -0400
Christian Schneider wrote:
Hallo,
Thanks for trying to help me.
Maybe freeing the pointer will help:
...
gtk_widget_destroy (fileselectionfensterglobal);
g_free(*fileselectionfensterglobal);
...
Yes, I know this (there's only fileselection=NULL;
missing ;-) ) but the important question is, if all
GtkWidgets (Buttons, labels, drawing areas etc.) and
other created objects from another pointer are still
in memory? Because if I use ddd and display the
fileselection-Widget I can see all parameters after
destroying the fileselection-window normally. What is
the situation from this parameters and all objects
included in the window (especially created from
pointers with malloc)?
And if this objects in memory exists: How is it
possible to remove them from memory?
Christian Schneider
It could be that "fileselectionfensterglobal" was part of a memory "block"
that wasnt freed yet (isnt there some kind of memory anti-fragmentation
algorythm in the g_new/g_free interface ?).
or, you might want to check:
g_print("count: %d\n",
G_OBJECT(fileselectionfensterglobal)->ref_count);
before calling "destroy". if the ref_count is greater that 1; it wont
get destroyed
untill there are no more references.
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]