>
>
> The Handle you pass in is not stored.  In fact, looking at the source for
> SetInternalField, the handle you pass in is dereferenced into the raw
> Object* and that is stored instead.
>
> So doing:
>
> A->SetInternalField(0, v8::Persistent<v8::Object>::New(B));
>
> is actually leaking a persistent handle to B, since SetInternalField is not
> holding onto the handle at all and there is no way to get that specific
> handle back.
>
> Another clue about this is that GetInternalField returns a Local, so it's
> actually generating a new handle every time you look up the value, rather
> than returning exactly the Handle you originally passed in.
>
>
Aaah! Thanks a lot for the explanation.

Does this also mean that I do not need to empty the internal field, when A
gets destroyed?


O.



> matt
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to