On Sat, Aug 22, 2009 at 5:10 PM, Siddu <siddu.s...@gmail.com> wrote: > Hi all, > I want understand Gobject in its entirety . mostly about references > (floating, weak , not so weak) and *memory management* . Is there any > pointers you could point me to read . >
As a part of the above question the follwing program returns a ref_count of 4 . Can someone explain me y ? #include <gtk/gtk.h> #include <stdio.h> void window_call_back(GtkWidget *widget, gpointer data) { g_print("the ref count of window is %d\n",G_OBJECT(widget)->ref_count); gtk_main_quit(); } int main(int argc,char *argv[]){ GtkWidget *window; gtk_init(&argc,&argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(G_OBJECT(window),"destroy",G_CALLBACK(window_call_back),NULL); gtk_widget_show(GTK_WIDGET(window)); gtk_main(); return 0; } > > -- > Regards, > ~Sid~ > I have never met a man so ignorant that i couldn't learn something from him > > > -- Regards, ~Sid~ I have never met a man so ignorant that i couldn't learn something from him _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list