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: Thu, 07 Aug 2003 09:57:57 -0400
if ((ptr = malloc(size)) != NULL) {
free(ptr);
if (ptr == NULL) {
/* you have a really freaky problem ;-) */
}
}
Cheers,
-Tristan
Christian Schneider wrote:
Hallo,
in my programm I've got the following global pointer:
+++
GtkWidget *fileselectionfensterglobal;
++
I created 3 signals to kill the window:
+++
void
on_fileselectionfensterglobal_destroy (GtkObject
*object, gpointer user_data)
{
...
gtk_widget_destroy (fileselectionfensterglobal);
}
void
on_ok_buttonfileselection_clicked (GtkObject
*object, gpointer user_data)
{
...
gtk_widget_destroy (fileselectionfensterglobal);
}
void
on_cancel_buttonfileselection_clicked (GtkObject
*object, gpointer user_data)
{
...
gtk_widget_destroy (fileselectionfensterglobal);
}
++
Somewhere in the programm I create the window:
+++
fileselectionfensterglobal =
create_fileselectionfensterglobal ();
gtk_widget_show (fileselectionfensterglobal);
++
If I "destroy" the window with one of the signal the
window disappears. Ok so far.
But I think the windows is still in memory because the
following code is not true:
+++
if (fileselectionfensterglobal == NULL){...}
++
My question now: How can I completely remove the
fileselectionwindow (or other windows ;-) ) with all
Widgets (Buttons etc.) in it from memory because if I
use the function create_fileselectionfensterglobal ()
again the old fileselectionwindow-data ist still in
memory but I do not want to use it anymore!
Perhaps you can give me an example-code for my problem
above.
Thanks for your help!
Bye
Christian Schneider
__________________________________________________________________
Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de
_______________________________________________
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]