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

How to Properly Switch Between Multiple File Sets and Manage Memory in DWV? #1781

Open
qiuye97 opened this issue Oct 23, 2024 · 1 comment
Open
Labels
question Further information is requested
Milestone

Comments

@qiuye97
Copy link

qiuye97 commented Oct 23, 2024

Hi @ivmartel

I’m working with DWV and trying to dynamically switch between multiple File[] sets. Initially, I tried directly calling App.loadFiles with a new File[], but the view didn’t update as expected.

Currently, my workaround is to create a new App instance each time and then call App.loadFiles, which successfully updates the view. However, with this approach, memory usage keeps increasing every time I switch files, and it doesn’t get freed up when my Vue component is destroyed. Additionally, I couldn’t find a method to properly destroy the App instance to free up memory.

Could you please guide me on the correct approach to achieve this?

Thanks so much for your help!

@ivmartel ivmartel added the question Further information is requested label Oct 23, 2024
@ivmartel ivmartel added this to the 0.34.0 milestone Oct 23, 2024
@ivmartel
Copy link
Owner

ivmartel commented Nov 4, 2024

Hi, this is a tricky problem. I would go for what you are doing currently, creating a new app for new files. Now regarding freeing memory, I haven't looked at it for some time. I managed to free some by deleting the pixel data buffer (see dicomBufferToView.js#L314), not sure if this could be added as a method for the dataController (and app)...

@ivmartel ivmartel modified the milestones: 0.34.0, 0.35.0 Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants