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 clear all work when destroying the viewer #628

Open
jonSeetrue opened this issue Dec 29, 2022 · 2 comments
Open

how clear all work when destroying the viewer #628

jonSeetrue opened this issue Dec 29, 2022 · 2 comments

Comments

@jonSeetrue
Copy link

i am a having an memory issue when the viewer is been destroy form the Dom the web-worker are still renaming and when the new viewer is been crated it dose not clear the old one's so if will load and destroy the viewer few time eventuality i will have a memory issue.
is there a method of terminate the worker before destroying the viewer?

@PaulHax
Copy link
Collaborator

PaulHax commented Dec 31, 2022

Good point. We can call worker.terminate() on the WebworkerPromises.

Workers are left hanging in a few module globals and elsewhere.

const imageDataFromChunksWorker = new ImageDataFromChunksWorker()
const imageDataFromChunksWorkerPromise = new WebworkerPromise(
imageDataFromChunksWorker
)

Do you have the time to make a PR fix these?

@jonSeetrue
Copy link
Author

jonSeetrue commented Jan 2, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants