mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Clean up EventEmitterWrapper on surface deallocation
Summary: clean up EventEmitterWrapper on surface deallocation. Will resolve T92179998. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D28938530 fbshipit-source-id: f718945f52a652a4b79a7a376f052035e4f41edb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e15f171080
commit
792acff149
@@ -64,4 +64,10 @@ public class EventEmitterWrapper {
|
||||
NativeMap payload = params == null ? new WritableNativeMap() : (NativeMap) params;
|
||||
invokeUniqueEvent(eventName, payload, customCoalesceKey);
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
if (mHybridData != null) {
|
||||
mHybridData.resetNative();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
@@ -251,6 +251,10 @@ public class SurfaceMountingManager {
|
||||
viewState.mStateWrapper.destroyState();
|
||||
viewState.mStateWrapper = null;
|
||||
}
|
||||
if (viewState.mEventEmitter != null) {
|
||||
viewState.mEventEmitter.destroy();
|
||||
viewState.mEventEmitter = null;
|
||||
}
|
||||
}
|
||||
|
||||
Runnable runnable =
|
||||
|
||||
Reference in New Issue
Block a user