lua-users home
lua-l archive

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

On Tue, Feb 10, 2009 at 4:07 PM, Roberto Ierusalimschy
<> wrote:
> Maybe we could avoid these workarounds by forcing a full garbage collection
> upon errors. This could be added to the core or through the libraries.
> (That is, pcall and other library functions that do protected calls should
> call lua_gc in case of errors, and user's C code would be recommended
> to do the same.)

This won't help in the case of a coroutine dieing due to an error. All
the objects are left on the its stack so none will be collected so
long as the coroutine persists.

-Patrick Donnelly

"One of the lessons of history is that nothing is often a good thing
to do and always a clever thing to say."

-Will Durant