On Thu, Oct 6, 2011 at 5:15 PM, Ondřej Žára <[email protected]> wrote:
> So you suggest storing a v8::Local in internal field, instead of > Persistent? That does not make much sense to me: local handles are > stack-allocated and this will crash badly once the HandleScope is > destroyed... > The handle is stack-allocated, but copying a handle (e.g. putting it in an internal field) keeps the reference to the underlying data alive. At least that's my theory - i haven't looked into the code or seen any details docs about it. A handle is just a smart pointer of sorts, so as long as any handle is alive, GC wouldn't kill the underlying ptr. That's my understanding, at least. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
