Nicholas Clark wrote: > If so, were we intending to use the same idea in perl6? Because it worries > me that with the setjmp()/longjmp() system anything like: > > myfunc { > foo = malloc(something); > some_other_func(...); > free(foo); > } > > will leak resources if some_other_func (or any of its descendants) jumps > past us. At least with C++, throwing exceptions calls destructors on the way > past each stack frame. Only if the exception is caught. The C++ standard doesn't specify if the stack should be unwound for uncaught exceptions. In the words of the standard 'it is implementation dependent'. Hah! C++ - what a crock. > Or have I missed something? Nope. In addition sigsetjmp/setjmp is not MT-safe, so it shouldn't be used anyway in threaded perl. Alan BurlisonThread Previous | Thread Next