lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> I've found out that Lua uses a neat jmb_buf linked list 
> to handle multiple jump destinations, but I don't know 
> what it does to avoid leaking memory.

It uses garbage collection :)

After the longjmp, it pops the stack back to where it was.
The next garbage collection, if there is no accessible
pointer to an object, the object is gone. Simple and
effective.