2012/8/8 Garth N. Wells <gn...@cam.ac.uk>: > The lines: > > VTKPlotter* plotter = new VTKPlotter(t); > return plotter; > > in the function dolfin::get_plot (dolfin/plot/plot.cpp) look > suspiciously like a memory leak. Can one of the plot developers > confirm either way?
Yes, we need a better solution here. The problem is that we have the interface where one both in cpp and python can do plot(some_plottable_object) and the plot window should stay on the screen even if the user doesn't store the returned pointer to the plotter object. So where should this object be deleted? And if we return a shared_ptr to the plotter object, wouldn't it be deleted immediately in this case? Benjamin > > Garth > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : dolfin@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp