medInria / medInria-public

Open-source part of the medInria software
https://med.inria.fr/
BSD 4-Clause "Original" or "Old" License
92 stars 72 forks source link

[Reslice] proper release of RAM (#774) #1189

Closed mathildemerle closed 9 months ago

mathildemerle commented 9 months ago

From PR https://github.com/Inria-Asclepios/medInria-public/pull/774 initially on MUSICardio.

This toolbox allows to solve memory problems in Reslice toolbox: mem leaks and memory used where it was not needed.

The toolbox does not close anymore the first container to create a new one with medResliceViewer. Instead, it removes the view, change the "default widget" to medResliceViewer, then at stop it initializes the default widget and add back the original data in the container, creating a new view itself. Also now, changing from this toolbox to an other does not create a new container/view/etc, especially if the toolbox was not activated. Before that, even opening this toolbox with a data and switching to an other toolbox was using a lot a memory for nothing.

:m: