Skip to content

A demo repository to show how to avoid potential leaks of VC and bridge leaks using React Native.

Notifications You must be signed in to change notification settings

grittymindy/AvoidVCAndRCTBridgeLeakDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

AvoidPotentialLeakOfVCUsingRN

A demo repository to show potential leaks of VC and bridge leaks using React Native. It's to show the issue 2598 of react-native.

###Problem The TwoViewController won't get deallocated, as well as the RCTBridge backing up the RCTRootView.
###Reason The reason why controllers and bridges won't get deallocated is there is a retain cycle in between.
Thanks to @tadeuzagallo to point this out.

###Solution I tried [bridge invalidate] and [bridge reload] to break the retain cycle. As @tadeuzagallo suggested, there's another possible way.

###Usage Run pod install first in the 'VCAndRCTBridgeLeakDemo' directory.

About

A demo repository to show how to avoid potential leaks of VC and bridge leaks using React Native.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published