Hi, I have the following scenario:
- a JS class / function is defined in C++; this class represents DB connection. - I have a persistent handle to that class's instance. - I make the handle weak, wanting to be informed when GC collects it: this way, I can close the DB connection when it is no longer used. This solution works, provided that GC gets a chance to clean the (lost) reference. However, I want to make sure that the MakeWeak callback gets executed _always_ (at least when my script ends and Context gets deleted), because after execution ends, I don't want any DB connections hanging around. Is there some way to "purge" whole global object / context so everything gets GC'ed ? Thanks a lot, Ondrej Zara --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
