Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid retaining TurboModuleManager in AppDelegate #37104

Closed
wants to merge 1 commit into from

Conversation

javache
Copy link
Member

@javache javache commented Apr 26, 2023

Summary:
The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Differential Revision: D45310066

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Apr 26, 2023
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC

Differential Revision: D45310066

fbshipit-source-id: 9dd0a713cd6015d8ec147c8d98d8fa548b90cb16
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC

Differential Revision: D45310066

fbshipit-source-id: 3cece290cb8c48cae7d7735ce227bd60065b5b47
javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC

Differential Revision: D45310066

fbshipit-source-id: 4129e5c3e614b62bbdba298b47b698f7c9f976d0
@facebook-github-bot
Copy link
Contributor

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

@analysis-bot
Copy link

analysis-bot commented Apr 26, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,623,502 +0
android hermes armeabi-v7a 7,936,340 +0
android hermes x86 9,110,446 +0
android hermes x86_64 8,965,250 +0
android jsc arm64-v8a 9,187,538 +0
android jsc armeabi-v7a 8,377,834 +0
android jsc x86 9,245,844 +0
android jsc x86_64 9,504,290 +0

Base commit: 0dcf81b
Branch: main

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 95f466a4266516b26dc37c8d5dbc697c545973c9
@facebook-github-bot
Copy link
Contributor

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

1 similar comment
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 416105a3fdf03ed0b4f7330c5ba5fd7fe7be21c2
javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 51ab1031b7573118ba664d981aa9eaaf061b4146
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 8f369ecd980332acbd4c08d872c9296233221991
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 26, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 4ca8bc4b394f208ca2e7e817fa247e921a437052
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 2363d57527eca0b3ceee25fb32159029423a16b1
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 378c11710d119198782f7a4cba9781842a72e8bc
@facebook-github-bot
Copy link
Contributor

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

javache added a commit to javache/react-native that referenced this pull request Apr 27, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: d28b4a24ebf745c5faea6b29390bc62aca949172
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 5263280e14d959f0d7530571e2614a59c8838088
@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Apr 27, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in ec1ab73.

@javache javache deleted the export-D45310066 branch April 27, 2023 14:09
jeongshin pushed a commit to jeongshin/react-native that referenced this pull request May 7, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 4199c9973d832cc07fd32b94f2dcbaa72f4d3920
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Pull Request resolved: facebook#37104

The AppDelegate (and other similar classes) only need to construct the TurboModuleManager for intialization purposes, and should not retain it beyond that. TurboModuleManager retains each of the TurboModule instances and through the new binding mechanism, also JSI pointers, which are invalid beyond the lifetime of the JS context.

Changelog: [iOS] Changed AppDelegate template to avoid retaining TurboModuleManager.

Reviewed By: sammy-SC, cipolleschi

Differential Revision: D45310066

fbshipit-source-id: 4199c9973d832cc07fd32b94f2dcbaa72f4d3920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants