Memory Leak with Fetch
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C++
- Estrellas
- 127k
- Forks
- 25.3k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 4
Descripción
Description
I have encountered a memory leak issue when using the fetch function in my React Native application. The memory usage gradually increases over time in iOS, leading to performance degradation and potential crashes.
React Native Version
0.72.4
Output of npx react-native info
OS: macOS 13.5
CPU: (10) arm64 Apple M1 Pro
Memory: 758.45 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.16.0
path: ~/.nvm/versions/node/v18.16.0/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 9.5.1
path: ~/.nvm/versions/node/v18.16.0/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.1
path: /Users/clemens/.rvm/gems/ruby-2.7.5/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 22.4
- iOS 16.4
- macOS 13.3
- tvOS 16.4
- watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode:
version: 14.3.1/14E300c
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.19
path: /usr/bin/javac
Ruby:
version: 2.7.5
path: /Users/clemens/.rvm/rubies/ruby-2.7.5/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
1. Create a React Native project with the necessary dependencies.
2. Implement a screen or component that utilizes the fetch function to make API requests.
3. Monitor the memory usage of the application over an extended period.
4. Observe that the memory usage consistently increases during and after making multiple fetch requests.
Snack, screenshot, or link to a repository
minimal example:
https://github.com/clemensmol/rn-fetch-memoryleak
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Empieza ejecutando el ejemplo mínimo de https://github.com/clemensmol/rn-fetch-memoryleak con React Native 0.72.4 en iOS y supervisa la memoria durante solicitudes fetch repetidas. Rastrea el comportamiento de las solicitudes y compara la memoria antes y después de ejecutar el reproductor; se considera terminado cuando el crecimiento de memoria demostrado se haya solucionado y la reproducción ya no muestre una fuga.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ios, javascript, react-native
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100