Hi Trevor,

Since V8 does not know how the memory backing an ArrayBuffer has been
allocated in this case, there is now good way for V8 to free it.
Just like previously with "external indexed data", the way to do it is to
use a weak persistent handle for the ArrayBuffer to get a notification when
ArrayBuffer becomes unreachable and then deal with your memory block
accordingly.

Dmitry


On Tue, May 13, 2014 at 12:54 AM, Trevor Norris <[email protected]>wrote:

> Just noticed that ArrayBuffer::New(Isolate*, void*, size_t) now always
> externalizes the data, and from the API there doesn't appear to be a way to
> retrieve the void* to do any sort of memcpy into an existing ArrayBuffer.
>
> This is presenting a fairly significant setback. As it's proving
> impossible to hand existing memory over to ArrayBuffer and have the garbage
> collector free the memory when the life of the ArrayBuffer has expired.
>
> Is there a way to get this done? If not, can it be made possible?
>
> /trev
>
> --
> --
> 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.
>

-- 
-- 
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