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 leakage in js threads #74

Open
DillionApple opened this issue Jun 16, 2019 · 0 comments
Open

Memory leakage in js threads #74

DillionApple opened this issue Jun 16, 2019 · 0 comments

Comments

@DillionApple
Copy link

DillionApple commented Jun 16, 2019

When I start a new thread which executes the following code, the memory will grow rapidly, and cause the app to crash.

setInterval(function () {
  let str = generateLongString(1000 * 1000 * 10); // generate a string with 10M bytes.
  str = null;
}, 0);

I use this piece of code to inject memory stress to the phone. I tried the same code in my browser. The memory will be collected by the browser's GC properly.

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