[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua Basics: file opens and the colon?
- From: Rici Lake <lua@...>
- Date: Mon, 29 Aug 2005 16:38:20 -0500
On 29-Aug-05, at 3:47 PM, Klaus Ripke wrote:
The garbage collector will deal with it eventually, which is probably
.. for one-shot-scripts, yes.
For a long running app, you should always control your ressource
usage at least by forcing a full gc run every request or some.
examples where lazy file closing blows up quite quickly
include scanning maildirs etc.
Sure. Lua 5.1's incremental GC is better at cleaning up fd's fast, but
it still wouldn't be good enough for scanning a zillion files.