TBB cvtColor memory leaks

asked 2014-05-10 08:35:37 -0600

grtwa gravatar image

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();

}

edit retag flag offensive close merge delete

Comments

I think you should change the other tbb version and rebulid again.

wuling gravatar imagewuling ( 2014-05-10 10:13:22 -0600 )edit

Thank you. I rebuild OpenCV 2.4.9 with TBB 4.2, but the memory leaks still exist.

grtwa gravatar imagegrtwa ( 2014-05-10 19:20:29 -0600 )edit

Do you only add tbb maybe some options.I think you can use tbb snd the other options do not choice and rebulid. I use tbb 4.2 but it is commerce version.

wuling gravatar imagewuling ( 2014-05-10 21:02:24 -0600 )edit