On Mar 5, 9:22 pm, Alex Iskander <[email protected]> wrote: > It annoyed me too. I wish they at least had a V8::Shutdown() function, > for end-of-program.
i just suggested such a feature here: http://code.google.com/p/v8/issues/detail?id=256 though my suggestion was a callback registration for context shutdown, like: typedef void (*ContextShutdownCallback)( Context *, void * arg ) (or similar) and we register: Context::GetCurrent()->AddShutdownHandler( myCallback, myData ) A more general solution might be: void Object::AddShutdownHandler( void (*)( Object *, void * userData ) ); That could be used for any objects, not just Weak ones. However, having such a feature also makes MakeWeak()'s argument irrelevant, as client side we could achieve the cleanup solution more generically via this (or a similar) new interface. > Good luck on your hacking session. Hopefully the supplemental GC > doesn't take you too long. Your suggested approach gave me some ideas which can be done fairly generically with templates, i think. :) --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
