After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142970 - Gtk::TreeView::get_path_at_pos dosen't free returned path
Gtk::TreeView::get_path_at_pos dosen't free returned path
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: TreeView
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2004-05-22 17:49 UTC by david
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description david 2004-05-22 17:49:19 UTC
When calling the function Gtk::TreeView::get_path_at_pos, gtkmm takes a copy of 
the returned GtkTreePath object, and passes this copy back to the caller of the 
function. The GTK+ docs specifiy that the returned GtkTreePath should be freed, 
but gtkmm just forgets about it.

Changing the line 

path = TreeModel::Path(pTreePath, true);

to

path = TreeModel::Path(pTreePath, false);

in gtkmm/gtk/src/treeview.ccg at line 259, so that you don't take a copy should 
fix this.
Comment 1 Murray Cumming 2004-06-03 09:32:34 UTC
Thanks. Done. Please provide an actual patch in future.