Skip to content

IOS integrated react native 0.56.1, memory will not be released after the interface is destroyed. #22313

@1203556555

Description

@1203556555

Environment

React Native Environment Info:
System:
OS: macOS 10.13.6
CPU: (12) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
Memory: 279.43 MB / 8.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node
Yarn: 1.10.1 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.12.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.13, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 26, 27, 28
Build Tools: 27.0.0, 27.0.3, 28.0.2, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.4.1 => 16.4.1
react-native: 0.56.1=> 0.56.1
npmGlobalPackages:
react-native-cli: 2.0.0

Description

IOS integrated react native 0.56.1, memory will not be released after the interface is destroyed.

Reproducible Demo

image
image
image

class RNVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

    let strUrl = "http://localhost:8081/index.bundle?platform=ios&dev=true";
    let jsCodeLocation = URL.init(string: strUrl)
    let rootView = RCTRootView.init(bundleURL: jsCodeLocation, moduleName: "helloWorld", initialProperties: nil, launchOptions: nil)
    self.view = rootView
}

}

After opening this interface and then exiting the interface, the memory is not released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions