[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Loadlib's callfromlib() - anybody using it?!?
- From: John Belmonte <jvb@...>
- Date: Tue, 11 Jun 2002 01:39:41 +0900
In several "common" platforms (such as most Unixes and Windows) you
get nothing by closing the state, as all resorces (memory and file
descriptors) are automatically released by the system when the program
On the other hand, closing a large state takes some time, as Lua has to
release all memory it was using.
It is possible that a Lua program grabs some resource that is not
automatically released (for example video memory, or the semaphore to
the robot attached to your USB port). Even though I wrote my program
correctly to free allocated resources, I need to worry about specifying
the -c option.
It seems backwards. Why not treat "not closing state" as a special
optimization that must be explicitly requested? (Still, I can't believe
it will make a noticeable difference in your average app.)
OpenPGP encrypted mail welcome.