Skip to content

Commit

Permalink
paddingKill状态的对象在虚拟机释放是没有回收 UEGC时崩溃
Browse files Browse the repository at this point in the history
  • Loading branch information
wusidn authored Jan 26, 2024
1 parent 04d9004 commit ef6f3a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions unreal/Puerts/Source/JsEnv/Private/JsEnvImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ FJsEnvImpl::~FJsEnvImpl()

for (int i = 0; i < ManualReleaseCallbackList.size(); i++)
{
if (ManualReleaseCallbackList[i].IsValid())
if (ManualReleaseCallbackList[i].IsValid(true))
{
ManualReleaseCallbackList[i].Get()->JsFunction.Reset();
}
Expand Down Expand Up @@ -747,7 +747,7 @@ FJsEnvImpl::~FJsEnvImpl()
for (auto Iter = DelegateMap.begin(); Iter != DelegateMap.end(); Iter++)
{
Iter->second.JSObject.Reset();
if (Iter->second.Proxy.IsValid())
if (Iter->second.Proxy.IsValid(true))
{
Iter->second.Proxy->JsFunction.Reset();
}
Expand All @@ -763,7 +763,7 @@ FJsEnvImpl::~FJsEnvImpl()
{
for (auto& Callback : KV.Value)
{
if (Callback.IsValid())
if (Callback.IsValid(true))
{
Callback->JsFunction.Reset();
}
Expand Down

0 comments on commit ef6f3a3

Please sign in to comment.