On 11/27/2013 03:49 PM, Sven Panne wrote:
On Wed, Nov 27, 2013 at 5:02 AM, Hoping White <[email protected] <mailto:[email protected]>> wrote:

    When I set a external pointer to v8::Object with
    SetAlignedPointerInInternalField,
    should I care when to release this pointer or it will be deleted
    automaticlly when this
    object deleted?


v8 doesn't care about the lifetime of the stuff pointed to, so you have to do it by yourself. The signature of the API itself is already a strong hint: What should v8 do with a void* when the object containing the pointer is garbage collected? free(ptr)? delete ptr? delete[] ptr? MyOwnCoolCleanup(ptr)? Is the "pointer" even a real pointer?
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
Thanks for the reply. Then any object which has AlignedPointerInInternalField must be hold by myself and release by myself. Is there any interceptor to do this?
So this can be easier with v8 gc.

--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to