Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Opencv Resize memory leak

I am using the cv::resize function from opencv (2.4.3). I am getting a memory leak. This it the code:

   Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
   cv::resize(src, src,cv::Size(width,height));
   BMPImage result (src);
   src.release();
   src = NULL;

I have a memory leak in cv::resize... This code is executed a lot of times (It resizes hundred images in an execution) and the memory doesn't stop to increase.... I was checking the opencv documentation but It explains that cv::resize handles its memory...

In my log, it get the error from the deallocation: 0x22081 call 0x6118

Opencv Resize memory leak

I am using the cv::resize function from opencv (2.4.3). I am getting a memory leak. This it the code:

   Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
   cv::resize(src, src,cv::Size(width,height));
   BMPImage result (src);
   src.release();
   src = NULL;

I have a memory leak in cv::resize... This code is executed a lot of times (It resizes hundred images in an execution) and the memory doesn't stop to increase.... I was checking the opencv documentation but It explains that cv::resize handles its memory...

In my log, it get the error from the deallocation: deallocation:

0x22081 call 0x6118 

<?deallocate@?$AutoBuffer@E$0BAAI@@cv@@QAEXXZ>

Opencv Resize memory leak

I am using the cv::resize function from opencv (2.4.3). I am getting a memory leak. This it the code:

   Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
   cv::resize(src, src,cv::Size(width,height));
   BMPImage result (src);
   src.release();
   src = NULL;

I have a memory leak in cv::resize... This code is executed used a lot of times (It resizes hundred images in an execution) and the memory doesn't stop to increase.... I was checking the opencv documentation but It explains that cv::resize handles its memory...

In my log, it get the error from the deallocation:

0x22081 call 0x6118 <?deallocate@?$AutoBuffer@E$0BAAI@@cv@@QAEXXZ>

Opencv Resize memory leak

I am using the cv::resize function from opencv (2.4.3). I am getting a memory leak. This it the code:

   Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
   cv::resize(src, src,cv::Size(width,height));
   BMPImage result (src);
   src.release();
   src = NULL;

I have a memory leak in cv::resize... This code is used a lot of times (It resizes hundred images in an execution) and the memory doesn't stop to increase.... I was checking the opencv documentation but It explains that cv::resize handles its memory...

In my log, it get the error from the deallocation:

0x22081 call 0x6118 <?deallocate@?$AutoBuffer@E$0BAAI@@cv@@QAEXXZ>

Update

I fixed the memory leak problem.... with this code

Mat src(height_,width_,CV_8UC3,(void *)&bits_[0]);
Mat dst;
cv::resize(src, dst,cv::Size(width,height),0,0,INTER_CUBIC);
BMPImage result (dst);
src.release();
dst.release();
src = NULL;
dst = NULL;

This code doesn't fix the deallocation problem with it is related to:

src.release();
src = NULL;

If I have a moment, I will investigate it.