Oh no, that's the exact behaviour I want, I want to transfer the ownership
back to C++. But in my experiments, if I construct a Persistent from a
Handle, calling ClearWeak() has no effect and the weak reference callback is
still called.

On Tue, Dec 1, 2009 at 1:47 PM, Stephan Beal <[email protected]> wrote:

> On Tue, Dec 1, 2009 at 3:23 AM, Abdulla <[email protected]> wrote:
>
>> If I'm passed a Handle<> that I know is a Persistent<>, can I
>> construct the persistent from the handle and call ClearWeak()? That
>> doesn't seem to be working for me.
>>
>
> Are you sure you want ClearWeak()? That will, if i'm not mistaken, tell v8
> that the handle is no longer persistent, but _will_not_ (in my experiments)
> trigger the weak callback. It is for use when your objects need to be
> destroyed from outside v8, so that you can tell v8 not to call the dtor. At
> least, that's how i use it.
>
> i think what you're looking for is Dispose().
>
> --
> ----- stephan beal
> http://wanderinghorse.net/home/stephan/
>
>  --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>



-- 
Thank you
Abdulla

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

Reply via email to