I am using v8 as a scripting language behind a game engine. Any objects 
created (new Player()) are then made into Persistent handles, so their 
deletion is then controlled by the engine itself.

Is it possible to alter the behavior of the JavaScript delete operator so 
that it can call a custom delete function in C++?

Something akin to this:

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

Thanks in advance.

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

Reply via email to