Signal memory leak.




There appears to be a memory leak in gtk_signal_connect_object.

--Karl

==================================================================

#include <gtk/gtk.h>
#define LEAK

void Foo() {}

int main(int argc,char** argv)
  {
    int cid;
    gtk_init(&argc,&argv);
    GtkWidget *w=gtk_button_new();

    while (1)
      {
        GtkWidget *w2=gtk_button_new();
#ifdef LEAK
        cid=gtk_signal_connect_object((GtkObject*)w,"clicked",
                                      (GtkSignalFunc)Foo,
                                      (GtkObject*)w2);
#endif
        gtk_object_sink((GtkObject*)w2);
      }
  }



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