On Fri, Dec 10, 2010 at 8:16 PM, Jeremy <[email protected]> wrote:
> There isn't a whole lot of documentation on v8, and I couldn't figure > out the answer to this. So maybe the mailing list can help. > We've had plenty of flame wars about HandleScope, i think :). > My question is this: if I'm writing an axillary function (let's say a > small inline function) that I am always intending to call from another > function that has already declared a scope, do I need to declare > another scope within the aux. function? Example: > No, you don't. In fact, you don't really need HandleScopes at all. i stopped using them entirely because they crashed at destruction time so often when i used them. Maybe it was due to my mis-use of them, but (A) if they were meant to be used then they should be documented and (B) it's hard to mis-use a type with only one useful function (Close()). > Should func2 define its own HandleScope and then close it before it > returns? Or will everything work out OK in this case? Or is there > altogether some other thing I should be doing? > In my experience, leaving out the scope in func1() is also fine. Maybe someone here with more HandleScope experience can counter me on that. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
