Browse Source

Don't only run dtor, really delete the object

Stefan Siegl 9 năm trước cách đây
mục cha
commit
1f56c8e43c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      v8js_class.cc

+ 1 - 1
v8js_class.cc

@@ -775,7 +775,7 @@ static void v8js_script_free(v8js_script *res, bool dispose_persistent)
 		res->name = NULL;
 	}
 	if (dispose_persistent) {
-		res->script->~Persistent(); // does Reset()
+		delete res->script; // does Reset()
 		res->script = NULL;
 	}
 }