Skip to content

Commit

Permalink
[unity]nodejs版本编译错误
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Dec 13, 2024
1 parent ba0ef9b commit 5f84d81
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions unity/native_src/Src/CppObjectMapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,17 @@ void FCppObjectMapper::CallbackDataGarbageCollected(const v8::WeakCallbackInfo<P
{
CallbackData->Finalize(&v8impl::g_pesapi_ffi, CallbackData->Data, DataTransfer::GetIsolatePrivateData(Data.GetIsolate()));
}
CallbackData->CppObjectMapper->FunctionDatas.erase(std::remove(CallbackData->CppObjectMapper->FunctionDatas.begin(), CallbackData->CppObjectMapper->FunctionDatas.end(),
CallbackData), CallbackData->CppObjectMapper->FunctionDatas.end());
for (auto it = CallbackData->CppObjectMapper->FunctionDatas.begin(); it != CallbackData->CppObjectMapper->FunctionDatas.end(); )
{
if (*it == CallbackData)
{
it = CallbackData->CppObjectMapper->FunctionDatas.erase(it);
}
else
{
++it;
}
}
delete CallbackData;
}

Expand Down

0 comments on commit 5f84d81

Please sign in to comment.