Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

TBB cvtColor memory leaks

I build OpenCV 2.4.9 with TBB 4.1, and call cvtColor in the following two pieces of code. Both of them report memory leaks. How can I avoid the memory leaks? Many thanks.

void main()

{ _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

cv::Mat colorImage(320,480,CV_8UC3);
cv::Mat grayImage;
cv::cvtColor(colorImage,grayImage,CV_BGR2GRAY);

}

void main()

{ _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );

cv::Mat colorImage(320,480,CV_8UC3);
cv::Mat grayImage(320,480,CV_8UC1);
cv::cvtColor(colorImage,grayImage,CV_BGR2GRAY);

colorImage.release();
grayImage.release();

}