On Fri, Mar 27, 2009 at 7:51 PM, Stephan Beal <[email protected]> wrote:
> Yes you can - the trick is to simply define a no-op destructor for the
> static instance (or change your destructor to somehow recognize that a
> given object is static/shared and should not be destroyed). i do this
> with a couple wrapped classes. e.g.:

Here's a real code example of doing this:

http://code.google.com/p/v8-juice/source/browse/trunk/src/lib/juice/PathFinder-js.cc

Search that (short) file for "Ctor(" and "Dtor(" and you'll see how it's done.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

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

Reply via email to