Re: Release memory for a GtkWindow



On Thu, 14 Mar 2002 15:26:28 +0100
zze-coframi balr001 <coframi balr001 rd francetelecom com> wrote:

The example code I put on my first name was created by Glade. 
So if I understand correctly, I just need to put 

        GtkWidget * button = gtk_button_new ();       
        gtk_widget_set_name (button, "button"); 
        gtk_widget_show (button); 
        gtk_object_set_data_full (GTK_OBJECT (window), "button", button,
(GtkDestroyNotify) gtk_widget_unref); 
        gtk_container_add (GTK_CONTAINER (window), button); 
I see no reason for all this stuff... I'd use only:

     GtkWidget * button = gtk_button_new ();    
     gtk_widget_show (button); 
     gtk_container_add (GTK_CONTAINER (window), button); 

[]s!

-- 
kov debian org: Gustavo Noronha <http://www.metainfo.org/kov>
Debian: <http://www.debian.org> * <http://debian-br.cipsga.org.br>



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