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

Fix missing autorelease pool in RCTPlatformDisplayLink #1277

Conversation

christophpurrer
Copy link

Please select one of the following

  • I am removing an existing difference between facebook/react-native and microsoft/react-native-macos 👍
  • I am cherry-picking a change from Facebook's react-native into microsoft/react-native-macos 👍
  • I am making a fix / change for the macOS implementation of react-native
  • I am making a change required for Microsoft usage of react-native

Summary

This fixes leaking _RCTTimer instances. The runloop does not push/pop autorelease pools for you with CFRunLoopPerformBlock. A similar autorelease pool is setup for the same reason in RCTMessageThread.

facebook@948cbfd

Changelog

[macOS] [Fixed] - Fix missing autorelease pool in RCTPlatformDisplayLink

Test Plan

Confirmed expected number of _RCTTimer instances in Xcode memory graph.

This fixes leaking `_RCTTimer` instances. The runloop does not push/pop autorelease pools for you with `CFRunLoopPerformBlock`. A similar autorelease pool is setup for the same reason in `RCTMessageThread`.

Confirmed expected number of `_RCTTimer` instances in Xcode memory graph.
@christophpurrer christophpurrer requested a review from a team as a code owner July 22, 2022 17:39
@harrieshin harrieshin merged commit b6f1220 into microsoft:main Jul 22, 2022
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
This fixes leaking `_RCTTimer` instances. The runloop does not push/pop autorelease pools for you with `CFRunLoopPerformBlock`. A similar autorelease pool is setup for the same reason in `RCTMessageThread`.

Confirmed expected number of `_RCTTimer` instances in Xcode memory graph.

Co-authored-by: Scott Kyle <skyle@fb.com>
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Mar 10, 2023
This fixes leaking `_RCTTimer` instances. The runloop does not push/pop autorelease pools for you with `CFRunLoopPerformBlock`. A similar autorelease pool is setup for the same reason in `RCTMessageThread`.

Confirmed expected number of `_RCTTimer` instances in Xcode memory graph.

Co-authored-by: Scott Kyle <skyle@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants