Hi all,

I am trying to understand the semantics of WeakObjectRetainer::RetainAs. I 
found the following single line comment in the source code (file heap.h):

// Abstract base class for checking whether a weak object should be 
retained.
class WeakObjectRetainer { ... }

It clearly states the RetainAs method would be called for every weak 
object. Does this apply to other objects that have 
Persistent<Object>::SetWeak method called for them?

In other words, if I have the following code fragment

Handle<Object> instance = Object::New(isolate);
Persistent<Object>* persistent = new Persistent<Object>(isolate, instance);
persistent->SetWeak(persistent, MyWeakCallback);

Would WeakObjectRetainer::RetainAs be called for the "instance" object?


Regards,
Mihail

-- 
-- 
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/d/optout.

Reply via email to