A few things are unclear to me after trying to use the ArrayBuffer api from v8 3.23.10
The first inconsistency I find is the disconnect between an initialized ArrayBuffer allocated via the globally set allocator and one that you have then externalized. It seems there is no good way to get this global allocator and thus properly know how to cleanup the ArrayBuffer::Contents once you you have them. The other difficult aspect is the inability to get the externalized contents again once you have gotten them once. This makes sense in the context of "externalization" but what I would find very useful is just access to the data pointer for the array buffer and let it continue to manage the lifetime of the memory. Allowing the array buffer to manage the lifetime has the nice benefit of using the correct allocator and re-using the memory if I have calls that want to do so; right now it is not possible to easily re-use the memory without some clever hacks. We already have a system for increasing the lifetime of a handle (persistents) so externalizing just to access the data and ensure it is not deleted too soon doesn't seem like a relevant api. tl;dr; 1. ArrayBuffer::Contents could be inconsistent with global ArrayBuffer allocator 2. No way to reuse array buffer memory since externalize can only happen once -- -- 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.
