Skip to content

Avoid retaining TurboModuleManager in AppDelegate#37104

Closed
javache wants to merge 1 commit into
facebook:mainfrom
javache:export-D45310066
Closed

Avoid retaining TurboModuleManager in AppDelegate#37104
javache wants to merge 1 commit into
facebook:mainfrom
javache:export-D45310066

Conversation

@javache
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@analysis-bot
Copy link
Copy Markdown

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

@facebook-github-bot
Copy link
Copy Markdown
Contributor

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

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
Copy Markdown
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
Copy Markdown
Contributor

This pull request has been merged in ec1ab73.

@javache javache deleted the export-D45310066 branch April 27, 2023 14:09
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