react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Do not pass ReactContext to getViewManagersMap

Open javache opened this issue 1 year ago • 3 comments

Summary: A common pattern to implement ViewManagerOnDemandReactPackage is to use a getViewManagersMap helper. If we capture ReactApplicationContext there, we will indefinitely retain the the very first ReactApplicationContext, and break/leak across reloads. Instead we should pass the ReactApplicationContext whenever we construct the ViewManager.

Changelog: [Internal]

Differential Revision: D56838427

javache avatar May 02 '24 02:05 javache

This pull request was exported from Phabricator. Differential Revision: D56838427

facebook-github-bot avatar May 02 '24 02:05 facebook-github-bot

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 19,527,867 -2
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 22,900,410 -4
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 67bc65df85d4ee6e00b45ba25882d8ef95d15ca3 Branch: main

analysis-bot avatar May 02 '24 03:05 analysis-bot

This pull request was exported from Phabricator. Differential Revision: D56838427

facebook-github-bot avatar May 02 '24 04:05 facebook-github-bot

This pull request has been merged in facebook/react-native@88de74b2dc6f816e1a36e5d43b5db74ddd9caf4e.

facebook-github-bot avatar May 02 '24 20:05 facebook-github-bot

This pull request was successfully merged by @javache in 88de74b2dc6f816e1a36e5d43b5db74ddd9caf4e.

When will my fix make it into a release? | How to file a pick request?

github-actions[bot] avatar May 02 '24 20:05 github-actions[bot]