diff --git a/Common/cpp/NativeModules/NativeReanimatedModule.cpp b/Common/cpp/NativeModules/NativeReanimatedModule.cpp index 13d47b7791c..e0cebbe3050 100644 --- a/Common/cpp/NativeModules/NativeReanimatedModule.cpp +++ b/Common/cpp/NativeModules/NativeReanimatedModule.cpp @@ -196,9 +196,10 @@ NativeReanimatedModule::~NativeReanimatedModule() { if (runtimeHelper) { runtimeHelper->callGuard = nullptr; runtimeHelper->valueUnpacker = nullptr; - // event handler registry stores some JSI values from UI runtime, so it has - // to go away before we tear down the runtime + // event handler registry and frame callbacks store some JSI values from UI + // runtime, so they have to go away before we tear down the runtime eventHandlerRegistry.reset(); + frameCallbacks.clear(); runtime.reset(); // make sure uiRuntimeDestroyed is set after the runtime is deallocated runtimeHelper->uiRuntimeDestroyed = true;