File tree 3 files changed +3
-3
lines changed
2-js-to-native-conversion/8_passing_wrapped/napi
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ MyObject::~MyObject() {
11
11
void MyObject::Destructor (napi_env env,
12
12
void * nativeObject,
13
13
void * /* finalize_hint*/ ) {
14
- reinterpret_cast <MyObject*>(nativeObject)-> ~MyObject ( );
14
+ delete reinterpret_cast <MyObject*>(nativeObject);
15
15
}
16
16
17
17
#define DECLARE_NAPI_METHOD (name, func ) \
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ MyObject::~MyObject() {
10
10
void MyObject::Destructor (napi_env env,
11
11
void * nativeObject,
12
12
void * /* finalize_hint*/ ) {
13
- reinterpret_cast <MyObject*>(nativeObject)-> ~MyObject ( );
13
+ delete reinterpret_cast <MyObject*>(nativeObject);
14
14
}
15
15
16
16
#define DECLARE_NAPI_METHOD (name, func ) \
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ MyObject::~MyObject() {
10
10
void MyObject::Destructor (napi_env env,
11
11
void * nativeObject,
12
12
void * /* finalize_hint*/ ) {
13
- reinterpret_cast <MyObject*>(nativeObject)-> ~MyObject ( );
13
+ delete reinterpret_cast <MyObject*>(nativeObject);
14
14
}
15
15
16
16
napi_status MyObject::Init (napi_env env) {
You can’t perform that action at this time.
0 commit comments