Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak after SNT is closed ? #208

Closed
NicoKiaru opened this issue Nov 23, 2023 · 4 comments
Closed

Memory leak after SNT is closed ? #208

NicoKiaru opened this issue Nov 23, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@NicoKiaru
Copy link

Describe the bug
It looks like the memory is not released after SNT is stopped.

To Reproduce
Look at memory occupation ( ~60 Mb) on a fresh start. Open SNT with a ~400Mb image, trace bunch or neurons (optional?). Close SNT. Look at memory: there's still 400 Mb occupied.

Expected behavior
I think the memory should go back to a lower value.

Screenshots
I've done a mem dump with visual VM and it looks like a hashmap in SNT retains most of the memory:

image

@NicoKiaru NicoKiaru added the bug Something isn't working label Nov 23, 2023
@tferr
Copy link
Member

tferr commented Nov 23, 2023

Thanks a lot for the report, @NicoKiaru!
It looks like this is the culprit. @carshadi, would you have time to look into it?

@carshadi
Copy link
Member

I'll take a look

@carshadi
Copy link
Member

@tferr this should be improved in #209 . The SNT plugin itself is not garbage collected presumably since several components hold references to it even after the UI is closed. However, after these changes, the plugin instance only occupies ~2KB after closing the UI.

tferr added a commit that referenced this issue Dec 11, 2023
@tferr
Copy link
Member

tferr commented Dec 12, 2023

This should now be fixed and #209 has been merged into main. However, since are now compiling with Java 11, this will only be released when Fiji Java 11 becomes available. I am not sure when that will be. Hopefully soon!!

@tferr tferr closed this as completed Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants