Ensure memory is handled properly with userdata
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-06-14 17:35:05 +02:00
parent 3217fd1479
commit 2c313791d9
5 changed files with 19 additions and 11 deletions

View File

@@ -56,8 +56,10 @@ end
auto obj = new UserDataTestObject();
auto parameter = new UserDataValue(HashedString::ConstHash("testObject"), obj);
script->CallFunction("testFunc", {parameter});
REQUIRE(obj->foo == 5000);
delete script;
REQUIRE(obj->foo == 5000);
delete obj;
delete parameter;
}