Memory leak in Native Modules with RCT_EXPORT_METHOD #26972
Labels
Bug
Needs: Author Feedback
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Hi !
Problem:
Memory leak and application crash on RCT_EXPORT_METHOD
When developing a module, I ran into a memory leak problem in NativeModules.
A memory leak occurs when the resolve() function is called from the Objective-C module with data transfer to the JS function.
React Native version:
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Memory: 421.92 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.12.0 - /usr/local/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
IDEs:
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
npmGlobalPackages:
react-native-cli: 2.0.1
iPad: 12.1
Steps To Reproduce
I wrote a test code:
FileReader.h
FileReader.m
FileReader.js
Describe what you expected to happen:
I wish the memory leak disappeared
Videoreport:
https://www.dropbox.com/s/aq9nu44tcziqulb/Screen%20Recording%202019-10-23%20at%2017.06.14.mov?dl=0
Thanks!
The text was updated successfully, but these errors were encountered: