react-native
react-native copied to clipboard
Do not pass ReactContext to getViewManagersMap
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
This pull request was exported from Phabricator. Differential Revision: D56838427
| 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
This pull request was exported from Phabricator. Differential Revision: D56838427
This pull request has been merged in facebook/react-native@88de74b2dc6f816e1a36e5d43b5db74ddd9caf4e.
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?