Monteverdi does not correctly free memory
Mantis Issue 1338, reported by jmichel, assigned to gpasero, created: 2017-01-16
When using Monteverdi, there are two cases where memory is not freed :
- Adding an image to the layer stack increases memory usage, but removing the same image from the layer stack has no effect on memory usage.
- After using an application, closing it with Quit button has no effect on memory usage, residual application memory is not freed.
This is very problematic because it means that monteverdi memory usage can only go one way : increasing until no more memory is available.
1484842815 - gpaseroI have spotted at least 2 places where resources are not freed :
- https://git.orfeo-toolbox.org/otb.git/commit/14a9578152ab46336e1a3e3a1d0761682410911f
- https://git.orfeo-toolbox.org/otb.git/commit/8269b44a6338b3c600e3026b0f1a8cb78fe79706
I am still getting memory consumption, but after a few loops it doesn't change much.
1485162765 - gpaseroCheck creation/deletion of GLImageActor , HistogramModel, Quicklook, ...
1485276630 - gpaseroThe check on GLImageActor, HistogramModel and QuicklookModel didn't revealed anything.
However I spotted this one : https://git.orfeo-toolbox.org/otb.git/commit/c39b2ec80a2307e8731a8b671743dfd8fb1dce15
I used Valgrind : the leak reported mostly come from OSSIM, and from underground Qt/X11/glib libraries.
Memory growth is still present, investigation goes on.
1485362123 - gpaseroI checked the creation/deletion of itk::DataObjects when loading & removing an image. Works fine.
1485365763 - gpaseroI checked the total number of