fetch() leaks memory on each request due to unreleased Blobs #19248
Labels
Impact: Regression
Describes a behavior that used to work on a prior release, but stopped working recently.
Issue: Author Provided Repro
This issue can be reproduced in Snack or an attached project.
JavaScript
🌐Networking
Related to a networking API.
Resolution: Locked
This issue was locked by the bot.
Environment
Environment:
OS: macOS Sierra 10.12.6
Node: 8.9.4
Yarn: 1.6.0
npm: 5.6.0
Watchman: 4.7.0
Xcode: Xcode 8.3.3 Build version 8E3004b
Android Studio: 3.1 AI-173.4720617
Packages: (wanted => installed)
react: 16.3.1 => 16.3.2
react-native: ~0.55.2 => 0.55.4
Steps to Reproduce
Execute request using
fetch
, e.g.Expected Behavior
Blob with fetch response should be released once
res
is out of scope (GC-ed).Actual Behavior
Blobs corresponding to fetch response are never released, leading to increasing memory usage during a lifetime of application. Leaked memory is at least of the size of all responses already received.
I have created a simple project, demonstrating memory leak: https://github.com/jesenko/react-native-fetch-memory-leak
Issue was probably introduced with #11573, and is thus affecting v0.54 and v0.55
The text was updated successfully, but these errors were encountered: