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

Destructor with clearInterval() is needed? #35

Open
ishiguroJSK opened this issue Jul 10, 2020 · 0 comments
Open

Destructor with clearInterval() is needed? #35

ishiguroJSK opened this issue Jul 10, 2020 · 0 comments

Comments

@ishiguroJSK
Copy link

Hello.
In our application we repeat creating the mjpegcanvas instance and discarding it.
I expect the instance can be discarded by mjpeg_canvas = null; ,
but the instance doesn't seem to be released by Garbage Collector,
and 6 or 7 repeats cause rendering stop.
tork-a/visualization_rwt#92

I doubt that the setInterval() is disturbing GC (https://reliablejavascript.com/2017/11/05/how-timer-intervals-can-leak-memory/),
and I solved this problem by adding clearInterval().

How about adding destructor function with clearInterval()?

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

1 participant