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

This commit is contained in:
Deukhoofd 2022-02-26 17:04:27 +01:00
parent 817bf387ac
commit d4a080714c
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}
}