Hi Daniel, <br><br>Thanks for the patch.  Could you file a ticket so that it doesn't get dropped by accident?  <a href="https://code.ros.org/trac/ros-pkg/newticket?component=vslam">https://code.ros.org/trac/ros-pkg/newticket?component=vslam</a><br>

<br>Thanks,<br>Tully<br><br><div class="gmail_quote">On Tue, Feb 1, 2011 at 2:55 PM, Daniel Maturana <span dir="ltr"><<a href="mailto:dimatura@gmail.com">dimatura@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi,<br>
I'm using vslam and noticed a memory leak in<br>
FrameProc::setStereoPoints. The method has a return path which fails<br>
to release an allocated FrameStereo object. Since the FrameStereo<br>
object has an image-sized buffer and this occurs on every frame it<br>
quickly adds up to hundreds of megabytes. I checked out the last<br>
version of frame.cpp from<br>
<a href="https://code.ros.org/svn/ros-pkg/stacks/vslam/tags/unstable/frame_common/src/frame.cpp" target="_blank">https://code.ros.org/svn/ros-pkg/stacks/vslam/tags/unstable/frame_common/src/frame.cpp</a><br>
and the problem is still there. I attach a diff with the fix.<br>
best,<br>
Daniel Maturana<br>
<br>
Index: frame.cpp<br>
===================================================================<br>
--- frame.cpp   (revision 35681)<br>
+++ frame.cpp   (working copy)<br>
@@ -34,6 +34,7 @@<br>
<br>
<br>
 #include <frame_common/frame.h><br>
+#include <pcl/common/common.h><br>
<br>
 using namespace Eigen3;<br>
 using namespace std;<br>
@@ -264,7 +265,10 @@<br>
           frame.goodPts[i] = false;<br>
       }<br>
<br>
-    if (!setPointCloud) return;<br>
+    if (!setPointCloud) {<br>
+      delete st;<br>
+      return;<br>
+    }<br>
<br>
     // convert disparities and image to point cloud with luminance/RGB<br>
     double cx = <a href="http://frame.cam.cx" target="_blank">frame.cam.cx</a>;<br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Tully Foote<br>Systems Engineer<br>Willow Garage, Inc.<br><a href="mailto:tfoote@willowgarage.com">tfoote@willowgarage.com</a><br>(650) 475-2827<br>