Hi Daniel, Thanks for the patch. Could you file a ticket so that it doesn't get dropped by accident? https://code.ros.org/trac/ros-pkg/newticket?component=vslam Thanks, Tully On Tue, Feb 1, 2011 at 2:55 PM, Daniel Maturana wrote: > Hi, > I'm using vslam and noticed a memory leak in > FrameProc::setStereoPoints. The method has a return path which fails > to release an allocated FrameStereo object. Since the FrameStereo > object has an image-sized buffer and this occurs on every frame it > quickly adds up to hundreds of megabytes. I checked out the last > version of frame.cpp from > > https://code.ros.org/svn/ros-pkg/stacks/vslam/tags/unstable/frame_common/src/frame.cpp > and the problem is still there. I attach a diff with the fix. > best, > Daniel Maturana > > Index: frame.cpp > =================================================================== > --- frame.cpp (revision 35681) > +++ frame.cpp (working copy) > @@ -34,6 +34,7 @@ > > > #include > +#include > > using namespace Eigen3; > using namespace std; > @@ -264,7 +265,10 @@ > frame.goodPts[i] = false; > } > > - if (!setPointCloud) return; > + if (!setPointCloud) { > + delete st; > + return; > + } > > // convert disparities and image to point cloud with luminance/RGB > double cx = frame.cam.cx; > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > -- Tully Foote Systems Engineer Willow Garage, Inc. tfoote@willowgarage.com (650) 475-2827