mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Call stopObserving on correct queue
Summary: Since `dealloc` can be called from any thread, this would result `stopObserving` being called on a different thread/queue than the specified `methodQueue`. We specifically encountered this issue with a module needing the main queue having its `stopObserving` called on a background queue. Changelog: [iOS][Fixed] - Call [RCTEventEmitter stopObserving] on specified method queue Reviewed By: RSNara Differential Revision: D23821741 fbshipit-source-id: 693c3be6876f863da6dd214a829af2cc13a09c3f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
18f29db5a7
commit
23717e48af
@@ -46,6 +46,7 @@ RCT_EXPORT_MODULE();
|
||||
|
||||
- (void)invalidate
|
||||
{
|
||||
[super invalidate];
|
||||
[_nodesManager stopAnimationLoop];
|
||||
[self.bridge.eventDispatcher removeDispatchObserver:self];
|
||||
[self.bridge.uiManager.observerCoordinator removeObserver:self];
|
||||
|
||||
Reference in New Issue
Block a user