Skip to content

Commit

Permalink
refactor: move invalidation from destructor to explicit invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
tjzel committed Jan 10, 2025
1 parent 2a232ef commit 6b138c1
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ NativeProxy::~NativeProxy() {
// has already been destroyed when AnimatedSensorModule's
// destructor is ran
reanimatedModuleProxy_->cleanupSensors();

layoutAnimations_->cthis()->invalidate();
}

jni::local_ref<NativeProxy::jhybriddata> NativeProxy::initHybrid(
Expand Down Expand Up @@ -623,7 +621,10 @@ void NativeProxy::setupLayoutAnimations() {
}

void NativeProxy::invalidateCpp() {
layoutAnimations_->cthis()->invalidate();

workletsModuleProxy_.reset();

if (reanimatedModuleProxy_ != nullptr) {
reanimatedModuleProxy_->invalidate();
}
Expand Down

0 comments on commit 6b138c1

Please sign in to comment.