On Mon, Jul 28, 2014 at 6:19 PM, <[email protected]> wrote:

> How can I change (and dispose) an object allocate with External::New ?
> [...]
>

The External objects are immutable wrappers around void*, so you can't
change these. Using SetInternalField to overwrite the previous field with a
new External (as you did in your example) is the way to go, just remember
to delete the previous SessionBridge (if that's the right point in its
lifetime), you can retrieve it with GetInternalField. Small hint: If
performance is important and your pointers are always 2-byte aligned, you
can use the pair:

   void* GetAlignedPointerFromInternalField(int index);
   void SetAlignedPointerInInternalField(int index, void* value);

-- 
-- 
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/d/optout.

Reply via email to