Skip to content

Commit

Permalink
fix: isolate dispose on app exit handling
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Sep 1, 2021
1 parent 62dff97 commit 57ec2ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions NativeScript/runtime/Runtime.mm
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@

Runtime::isolates_.erase(std::remove(Runtime::isolates_.begin(), Runtime::isolates_.end(), this->isolate_), Runtime::isolates_.end());

this->isolate_->Dispose();

if (![NSThread isMainThread]) {
this->isolate_->Dispose();
}

currentRuntime_ = nullptr;
}

Expand Down

0 comments on commit 57ec2ec

Please sign in to comment.