You are correct. I freed the path by Gtk.TreeModel - Interfaces - Gtk 3.0. I got segment fault. If I didn’t free the path, it was Ok. The document sounds not correct (maybe copy from GTK+)
This is the extract thing happening to me I am getting segmentation fault
this is the python code that seems to work fine
def findSelectNode( self, text ):
# BUG: Only by name for now.
tree_iter = self.findNodeByDescription( text )
if ( tree_iter != None ):
print("###### SELECTING ROW" )
path = self.tree_store.get_path( tree_iter )
self.tree_view.expand_to_path( path ) # expand the whole branch
self.tree_view.get_selection().select_path( path ) # select it
*.cpp:1496:56: error: cannot call member function Gtk::TreeModel::Path Gtk::TreeModel::get_path(const iterator&) const without object
selectedPath = Gtk::TreeModel::get_path(sIter);