Local<ObjectTemplate> tpl = ObjectTemplate::New(isolate); tpl->SetInternalFieldCount(1); Local<Object> ret = tpl->NewInstance(); TestExternal* ex = new TestExternal(); ret->SetInternalField(0, External::New(isolate, ex));
Is it possible to delete the pointer exmanually if it is retno longer in use?
ex
ret
Where does the source code for the evidence show that I should or should not?
, ++ : new, delete, . , , . ( ), " ", .
new
delete
V8 . v8::External , , - , (a void* ).
v8::External
void*
V8 Persistent "" , V8 GC , . v8.h :
Persistent
. , . . , GC - !
, ++ B., .
, v8::External TestExternal , - , TestExternal.
TestExternal
, v8::External , , , , delete , .
Source: https://habr.com/ru/post/1677099/More articles:Connect to Google Cloud Cloud from an application engine instance - google-app-engineError "Entity object cannot reference multiple instances of IEntityChangeTracker" - c #What is the best way to write a loop that is read from a file? - bashConfiguring JSDOM with Mocha - javascriptUsing select in where where - sqlProvide immutability or partial immutability that cannot be silent - javascriptФорма содержимого ConstraintLayout изменилась при прокрутке - json@RolesAllowed vs. @PreAuthorize vs. @Secured - springCasting objects - javascriptHow to show selling price or regular woocommerce price if there is no selling price - phpAll Articles