Skip to content

Commit

Permalink
[unity]il2cpp优化特性对一个js对象频繁传递到C#后马上释放概率导致崩溃 fix #1940
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Dec 11, 2024
1 parent ee32720 commit 7997118
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ static Il2CppGCHandle* FindOrCreateHandleStoreOfValue(struct pesapi_ffi* apis, p
{
*out_object = il2cpp::gc::GCHandle::GetTarget(*res);
//PLog("found existed jsobject:%p", *out_object);
if (out_object == nullptr)
{
value_ref = apis->duplicate_value_ref(value_ref);
}
}

*out_value_ref = value_ref;
Expand Down

0 comments on commit 7997118

Please sign in to comment.