RE : Destroying a Window and re-creating it
- From: "zze-DEPREZ Olivier FTRD/DMI/SOP" <olivier deprez rd francetelecom com>
- To: <gtk-list gnome org>
- Subject: RE : Destroying a Window and re-creating it
- Date: Wed, 23 Jun 2004 10:24:58 +0200
I understood my problem. In fact I thought that as GTK+ is a bit object oriented, passing arguments was made quite like in C++, and that - in my case - I had a local copy of the parent List.
The problem then when I destroyed the Window, is that the List contained null references as objects were destroyed. I have to remove these elements from the list each time I destroy my Window, as the List "lives" longer than the Window in question.
-----Message d'origine-----
De : gtk-list-bounces gnome org [mailto:gtk-list-bounces gnome org] De la part de zze-DEPREZ Olivier FTRD/DMI/SOP Envoyé : mercredi 23 juin 2004 09:00 À : gtk-list gnome org Objet : RE : gtkwidgexts
Hello,
I have some problems while passing arguments to a function in GTK+ 2.4.2.
This function takes as argument a GtkWidget * (no interest) and a gpointer.
This gpointer is in fact a list (Glist *) containing some information I need and the parent window.
Everything goes fine untill I want to close this window with gtk_widget_destroy(). It always works the first time, but crashes with a segfault the second or third time.
It seems to me that when I create again the parent window and the list of parameters I want to give to my function, there is a problem of allocation/reallocation or something like that ...
I guess you would like to see the output errors, but it's not very explicit: bunch of lines with Glib-Object-WARNING : "invalid cast", or with Gtk-CRITICAL: "assertion GTK_IS_(...) failed".
Do the gtk_widget_destroy() freeds all the memory a Widget used, especially single and double-chained lists ?
Thanks,
Olivier
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]