diff --git a/ReactCommon/fabric/scheduler/Scheduler.cpp b/ReactCommon/fabric/scheduler/Scheduler.cpp index 076d269e58..14a4f77086 100644 --- a/ReactCommon/fabric/scheduler/Scheduler.cpp +++ b/ReactCommon/fabric/scheduler/Scheduler.cpp @@ -127,6 +127,7 @@ Scheduler::~Scheduler() { // The thread-safety of this operation is guaranteed by this requirement. uiManager_->setDelegate(nullptr); + uiManager_->setAnimationDelegate(nullptr); // Then, let's verify that the requirement was satisfied. auto surfaceIds = std::vector{}; diff --git a/ReactCommon/fabric/uimanager/UIManager.cpp b/ReactCommon/fabric/uimanager/UIManager.cpp index b4910cee67..f7172002c4 100644 --- a/ReactCommon/fabric/uimanager/UIManager.cpp +++ b/ReactCommon/fabric/uimanager/UIManager.cpp @@ -318,8 +318,7 @@ void UIManager::shadowTreeDidFinishTransaction( #pragma mark - UIManagerAnimationDelegate -void UIManager::setAnimationDelegate( - UIManagerAnimationDelegate *delegate) const { +void UIManager::setAnimationDelegate(UIManagerAnimationDelegate *delegate) { animationDelegate_ = delegate; } diff --git a/ReactCommon/fabric/uimanager/UIManager.h b/ReactCommon/fabric/uimanager/UIManager.h index 543bf97cfa..ab6fdbcca6 100644 --- a/ReactCommon/fabric/uimanager/UIManager.h +++ b/ReactCommon/fabric/uimanager/UIManager.h @@ -46,7 +46,7 @@ class UIManager final : public ShadowTreeDelegate { * The delegate is stored as a raw pointer, so the owner must null * the pointer before being destroyed. */ - void setAnimationDelegate(UIManagerAnimationDelegate *delegate) const; + void setAnimationDelegate(UIManagerAnimationDelegate *delegate); void animationTick(); @@ -140,7 +140,7 @@ class UIManager final : public ShadowTreeDelegate { SharedComponentDescriptorRegistry componentDescriptorRegistry_; UIManagerDelegate *delegate_; - mutable UIManagerAnimationDelegate *animationDelegate_{nullptr}; + UIManagerAnimationDelegate *animationDelegate_{nullptr}; UIManagerBinding *uiManagerBinding_; ShadowTreeRegistry shadowTreeRegistry_{}; };