On Mon, Feb 13, 2012 at 8:49 PM, Ameise <[email protected]> wrote:
> var obj = new Player(); <-- calls something like CreatePlayer in C++ > delete obj; <-- calls a DeleteObject in C++, which will free the memory > and the handles > You can't (AFAIK) modify the delete operator's behaviour but you can include a destructor function in your JS-bound classes, e.g. obj.destroy() That destructor detaches the persistent handle and calls delete on the native pointer. i add such a destructor for all native classes i bind. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
