Re: Re: music browser

"Kristian G. Kvilekval" <[email protected]>
Newsgroups gmane.comp.audio.zinf.devel
Message-ID <[email protected]>
On Wed, 2003-09-24 at 11:49, David Hough wrote:

> Ok, after looking at the documentation for gtk_tree_view_get_path_at_pos 
> (http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeView.html#gtk-tree-view-
> get-path-at-pos) and the source code for GTKMM, it looks like I was looking 
> at the wrong argument. It looks like we don't have to worry about 
> TempColumn as the Wrap function means that when GTK deletes the object, 
> GTKMM will delete TempColumn for us, I think anyway.
> However when GTKMM calls gtk_tree_view_get_path_at_pos it takes a copy of 
> the returned path, but never frees the returned path, which according to 
> the GTK docs you have to do. I'm assuming this is actually the cause of our 
> memory leak.
> 
> So third time lucky and all, I've written a workaround for this that means 
> we use the GTK API instead of the GTKMM api for this one call, and dosen't 
> take a copy of the returned path, so does free it. I've tested it in so 
> much that I've made sure it dosn't break anything. Unfortunatley I don't 
> have any experience in looking for memory leaks so I don't know how to 
> detect them, or in this case check we don't have one anymore.

You got it!   No more leak.   Have you reported this to gtkmm?


> Anyway, I've made the code available as an tla/arch archive at http://www-
> student.cs.york.ac.uk/~djh123/arch/. The archive name is 
> [email protected]. The code is in branch zinf--mdb which is a 
> continuation from [email protected]/zinf--mdb--0.1--patch-12. If 
> anyone wants the code as a normal patch, just say, and I'll try and 
> generate one.

-- 
email:[email protected] office:(805)893-4276 http://www.cs.ucsb.edu/~kris



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.