Thanks for your suggestion.

In fact, I have tried to use it in other scene, but it crash in some
situation, and I can't find the root cause :(

The broken code like this

v8::Persistent<v8::External>::New(payload).MakeWeak(payload->Value(),
DisposeCallback);

Anyway, I will try again

On 12月16日, 上午1时56分, Stephan Beal <[email protected]> wrote:
> On Wed, Dec 15, 2010 at 6:39 PM, Flier Lu <[email protected]> wrote:
> > I need to store some C pointers in a v8 object, which may point to a
> > data area. So, I use External::New to convert a C++ object pointer and
> > ...
> > Are there any hook or callback could do it?
>
> What you're looking for is called a Persistent Handle (or Weak Persistent
> Handle):
>
> http://code.google.com/apis/v8/embed.html#handles
>
> Those docs will get you started, but getting used to them requires some
> experimentation and/or poking around other people's code.
>
> --
> ----- stephan bealhttp://wanderinghorse.net/home/stephan/

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

Reply via email to