-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Gradual memory leak with fetch (iOS only) #4761
Comments
Hey ajwhite, thanks for reporting this issue! React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
|
Wondering if this is something that @nicklockwood might have some thoughts towards |
I've tested this a couple more times.
Both of these have a gradual rise in memory. Without Without The below is with a simple interval componentDidMount() {
setInterval(() => {
this.state.value++;
this.setState(this.state);
}, 100);
} |
Also discussed at #4730 |
Thanks for the cross ref, there's a few threads open and I haven't seen this one yet. |
After retesting these cases in release mode, I can confirm that this is not a problem and only exists when running in debug mode. 🎉 |
I noticed my application, which relies on periodic polling, has a memory footprint that grows consitently over time. I've vetted it for any global leaks and decided to scale down the scenario with a new project that runs a single
fetch
on an interval and observed the same behavior in steady growth. Android remained flat with no growth after releasing resources.Note: this is in release mode,
dev=false
The component does one thing -- a
fetch
every second and updates the state with a counter.Here's a peak at the allocation instrument
At around 5 hours in the footprint is over 6x what it initially was:
Here's a breakdown over time, I will continue to update it over the next few hours:
This is seen in
0.15.0
, however I believe this is is separate than that of #4538The text was updated successfully, but these errors were encountered: