Skip to content

Commit

Permalink
Invalidate displaylink when invalidate instance in bridgeless mode (#…
Browse files Browse the repository at this point in the history
…43603)

Summary:
`RCTDisplayLink` retains itself because of `CADisplayLink`, let's call `invalidate` to break the retain cycle. cc philIip

## Changelog:

[IOS] [FIXED] - [Fabric] Invalidate displaylink when invalidate instance in bridgeless mode

Pull Request resolved: #43603

Test Plan: After instance invalidate, `RCTDisplayLink` deallocated .

Reviewed By: fabriziocucci

Differential Revision: D55239145

Pulled By: javache

fbshipit-source-id: d9ceb9cd3a2cd91700e917c909d7097dacba240b
  • Loading branch information
zhongwuzw authored and facebook-github-bot committed Mar 22, 2024
1 parent 223e6dc commit 0a12557
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ - (void)invalidate
self->_jsRuntimeFactory = nullptr;
self->_appTMMDelegate = nil;
self->_delegate = nil;
[self->_displayLink invalidate];
self->_displayLink = nil;

self->_turboModuleManager = nil;
Expand Down

0 comments on commit 0a12557

Please sign in to comment.