File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
packages/react-native-reanimated/Common/cpp/reanimated/Fabric Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ void ReanimatedMountHook::shadowTreeDidMount(
4545
4646 // Create callback to notify JavaScript about node removal decisions
4747 auto callback = [this ](Tag tag, bool isFrozen) {
48- if (moduleProxy_) {
49- moduleProxy_->onNodeRemovalDecision (tag, isFrozen);
48+ auto moduleProxy = moduleProxy_.lock ();
49+ if (moduleProxy) {
50+ moduleProxy->onNodeRemovalDecision (tag, isFrozen);
5051 }
5152 };
5253 propsRegistry_->handleNodeRemovals (*rootShadowNode, callback);
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class ReanimatedMountHook : public UIManagerMountHook {
3535 private:
3636 const std::shared_ptr<PropsRegistry> propsRegistry_;
3737 const std::shared_ptr<UIManager> uiManager_;
38- const std::shared_ptr <ReanimatedModuleProxy> moduleProxy_;
38+ const std::weak_ptr <ReanimatedModuleProxy> moduleProxy_;
3939};
4040
4141} // namespace reanimated
You can’t perform that action at this time.
0 commit comments