31 Mar 2000 Uruk   » (Apprentice)

GTK+ has been pissing me off recently - I've been finding and dealing with a lot of memory leaks in my program that were caused by the lack of a call to g_free() for some things that I didn't know needed to be free'd(). I emailed gtk-list about it, and apparently, moving forward, all strings being returned will be g_strdup()'d.

I've had to hunt through the GTK+ source in order to find out which calls return values that have to be freed by the caller, and which calls return values that are just pointers to the guts of a widget. (Which would be bad to free). I don't mind poking through the source on that, (I've learned a lot about the guts of GTK+ that way) but I wish that kind of stuff was in the RDP.

I guess it's really not a small thing when one of your calls is in a loop and leaks a few hundred bytes of memory each time through. Oops. And after all the hunting, I'll probably still miss something...

I've been using memprof (which I think Owen wrote) to do this stuff. It's not bad.

Back to debugging...

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!