Ensure memory is handled properly with userdata
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user