Skip to content

Commit

Permalink
[unity] fix crash on ios
Browse files Browse the repository at this point in the history
(cherry picked from commit 1e8276937a1b0955950ab09b057e77e7e2a77ea0)
  • Loading branch information
bingcongni committed Feb 14, 2025
1 parent 69ea454 commit 0ea3ade
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions unity/native_src/Src/JSEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,12 @@ namespace PUERTS_NAMESPACE
#ifdef WITH_IL2CPP_OPTIMIZATION
CppObjectMapper.UnInitialize(MainIsolate);
#endif

for (int i = 0; i < CallbackWithFinalizeInfos.size(); ++i)
{
CallbackWithFinalizeInfos[i]->JsFunction.Reset();
}

BackendEnv.UnInitialize();

for (int i = 0; i < CallbackInfos.size(); ++i)
Expand Down

0 comments on commit 0ea3ade

Please sign in to comment.