If I understand you correctly, you have to make absolutely sure the
context is disposed and there are no outstanding strong handles to it
or any objects within it. Then force garbage collection like this:
while (!V8::IdleNotification());
This technique works for me. Forcing garbage collection in this manner
results in all my weak callbacks being invoked, allowing me to clean up
my host state properly. Good luck!
On Friday, May 11, 2012 12:34:50 PM UTC-4, Glidos wrote:
> I've arranged for wrapped objects to be destroyed during garbage
> collections via Persistent<Object>::MakeWeak,
> but when I've finished with a context, I cannot see a way to force
> garbage collection of its globals. I tried context.Dispose (so that I
> was no longer holding a persistent handle) and then repeatedly calling
> ContextDisposeNotification and then IdleNotification. That doesn't
> work. I'm very new to v8, and struggling. Any help would be much
> appreciated.
>
> Cheers,
> Paul.
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users