Matrix, invert() memory leak

asked 2019-02-19 03:08:03 -0500

updated 2019-02-19 06:21:27 -0500

LBerger gravatar image
  • OpenCV => 3.4.5
  • Operating Systemp / Platform -> Windows10 64 bit
  • Complier -> Visual Studio 2015

// C++ code example

int m = (int)xData.size();  
cv::Mat J_k(m, 4, CV_64FC1);
cv::Mat invJ;

cv::invert(J_k, invJ, cv::DECOMP_SVD);   // memory leak

Memory leak occurs when I using the invert function. Please check this code and HELP me if you know why this leak occurs.. Thx..

edit retag flag offensive close merge delete

Comments

False/positive ? Do you like morse to communicate? can you give a full example in text version ? Which tool do you use to detect memory leak ?

LBerger gravatar imageLBerger ( 2019-02-19 03:36:46 -0500 )edit
1

.-- . / -.-. .- -. / --- -. .-.. -.-- / .... . .-.. .--. --..-- / .. ..-. / .-- . / -.-. .- -. / ... . . / - .... . / -.-. --- -.. . / --- ..-. / -.-- --- ..- .-. / .- - - . -- .--. -

berak gravatar imageberak ( 2019-02-19 03:53:19 -0500 )edit

Which tool do you use? valgrind is used inside opencv build bot. I cannot reproduce your sample xdata.size() what is it?

LBerger gravatar imageLBerger ( 2019-02-19 07:03:09 -0500 )edit

xData.size() is a variable value.

gaebalsaebal gravatar imagegaebalsaebal ( 2019-02-19 18:05:32 -0500 )edit