Release Script owner references before setting it. This hopefully prevents extremely high reference counts.
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd committed 2022-02-26 17:04:27 +01:00
1 parent 817bf387ac
commit d4a080714c
1 file changed
+1
@@ -24,6 +24,7 @@ AngelScriptScript::AngelScriptScript(const ArbUt::OptionalBorrowedPtr<void>& own
THROW("Script was created with owner value, but with unknown owner type.")
}
auto* handle = GetAngelscriptOwner();
handle->ReleaseReferences(resolver->GetEngine());
handle->Set(owner.GetValue(), ownerType);
}
}