diff --git a/test/basic_types/boolean.cc b/test/basic_types/boolean.cc index 900438f..fd6e316 100644 --- a/test/basic_types/boolean.cc +++ b/test/basic_types/boolean.cc @@ -12,8 +12,8 @@ Value CreateEmptyBoolean(const CallbackInfo& info) { } Value CreateBooleanFromExistingValue(const CallbackInfo& info) { - Boolean* boolean = new Boolean(info.Env(), info[0].As()); - return Boolean::New(info.Env(), boolean->Value()); + Boolean boolean(info.Env(), info[0].As()); + return Boolean::New(info.Env(), boolean.Value()); } Value CreateBooleanFromPrimitive(const CallbackInfo& info) { diff --git a/test/basic_types/number.cc b/test/basic_types/number.cc index 436d519..4ccb844 100644 --- a/test/basic_types/number.cc +++ b/test/basic_types/number.cc @@ -67,8 +67,8 @@ Value OperatorDouble(const CallbackInfo& info) { } Value CreateEmptyNumber(const CallbackInfo& info) { - Number* number = new Number(); - return Boolean::New(info.Env(), number->IsEmpty()); + Number number; + return Boolean::New(info.Env(), number.IsEmpty()); } Value CreateNumberFromExistingValue(const CallbackInfo& info) {