From: Paul C. <pw...@sp...> - 2001-01-07 08:16:23
|
On Sat, 6 Jan 2001, Jared Mauch wrote: > There appears to be a memory leak someplace > > PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND > 17991 jared 17 0 112M 77M 25544 R 95.2 62.8 1003m gtk_gnutella It looks to me like a major leak is that we don't free the stuff on the search notebook page when we close a search. I've spent a few hours trying to clean it up, but I can't figure out what needs to be done to actually free the memory. For example, _new_search() does this: gtk_list_prepend_items( [list], glist) and if I put gtk_list_remove_items( [list], glist) in search_close_current(), ccmalloc still says that the gtk_list_prepend_items call is leaking memory. Trying to gtk_widget_destroy(sch->clist) seems to cause a segfault if it's done after gtk_clist_clear(sch->clist). Trying to gtk_widget_destroy() the labels that are put in as column headers in the search pages doesn't crash, but according to ccmalloc, still leaks memory. Does anyone know how you're supposed to clean up things in gtk? Neither the gtk-reference nor the gtk tutorial really address this, AFAICT. -- Paul Cassella |