Here's a snippet from something I just wrote<br><br>Mat scratch;  // part of the state of the node -- if the image size stays constant, it will only allocate once<br><br>    //PROCESS THE IMAGE<br>    if (img_bridge_.fromImage(*msg, "bgr8"))<br>
    {<br>        Mat I = img_bridge_.toIpl();<br>        I.copyTo(scratch);<br>. . . <br>you don't have to deallocate ever (you could ... using scratch.release() but you almost never need to<br><br><br><br><div class="gmail_quote">
On Sat, May 22, 2010 at 6:39 PM, chriss lei <span dir="ltr"><<a href="mailto:lei.chriss@gmail.com">lei.chriss@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Thank you.<br>
<br>
I obviously forgot to release the image.<br>
<br>
Also, converting cv::Mat into IplImage also worked.<br>
<br>
I guess I'll slowly migrate towards using cv::Mat.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://ros-users.122217.n3.nabble.com/cvBridge-opencv-memory-leak-problem-tp837144p837271.html" target="_blank">http://ros-users.122217.n3.nabble.com/cvBridge-opencv-memory-leak-problem-tp837144p837271.html</a><br>

Sent from the ROS-Users mailing list archive at Nabble.com.<br>
<br>
------------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
ros-users mailing list<br>
</font><div class="im"><a href="mailto:ros-users@lists.sourceforge.net">ros-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ros-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/ros-users</a><br>
_______________________________________________<br>
</div><div><div></div><div class="h5">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>
</div></div></blockquote></div><br>