Re: Signal memory leak.

Karl Nelson <> writes:
>         cid=gtk_signal_connect_object((GtkObject*)w,"clicked",
>                                       (GtkSignalFunc)Foo,
>                                       (GtkObject*)w2);

You never destroy "w" and you keep adding connections, so it has
continuously increasing memory use (also the speed of
gtk_signal_connect() starts to get really crappy... we seem to have an
O(n) list append in there ;-)

memprof shows no actual leaks, a pointer to all memory is retained.

>         gtk_object_sink((GtkObject*)w2);

w2 is destroyed but not w...


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