Closed nrasulnrasul closed 3 years ago
Thanks! Confirmed, I can see the memory leak. I'll look at it...
Fixed. See: a4b8c37b81de7340d5f334f0d9eb67be5244a8c1 and the updated source code: main.zip
Cheers
Thanks for the fix and updated code. I couldnt verify it now becuase i am using mrpt from ppa:joseluisblancoc/mrpt repository in Ubuntu 20.04.
The most relevant wrong part in your code was the wrong order of xMin, xMax setting the plane dimensions, you can change that locally.
I have tested your code, but I could still see the memory leak with looping 1000 times.
i.e while (x < 1000) { // Line 48
Ok, I see... you were right, thanks a lot for testing and reporting!
This serious leak is now fixed in the branch develop
.
Hi,
I am using
gui::CDisplayWindow3D
andopengl::CTexturedPlane
for visualizing maps(colour maps not just gray).I observed that there was memory leak in
opengl::CTexturedPlane::assignImage
.If the below program run for 1000 loops (x =1000), it will fill the 16gb ram and the system hangs.
I have attached the program with cmake, so that you can build and verify the issue easily. Just run the program and observe the memory using
htop
.ZIP file
Is it the correct way of using
CImage
withCTexturedPlane
.Thanks.