[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: state of the Lua nation on resource cleanup
- From: Patrick Donnelly <batrick.donnelly@...>
- Date: Tue, 10 Feb 2009 23:22:35 -0700
On Tue, Feb 10, 2009 at 4:07 PM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> 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