lua-users home
lua-l archive

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

On Thu, Dec 4, 2008 at 8:27 AM, "O. Wölfelschneider" <> wrote:
> Can I somehow tell the garbage collector that new_fnord() allocates big
> time?

this is a frequent request.  i'm sure lots of us would love to see it in Lua5.2

> Currently I'm calling collectgarbage("collect") every now and then, but this
> doesn't feel right.

the usual solution is to add a 'close' method to any userdata object
that holds an expensive non-lua resource, like open files, DB
connections, etc, and in your case, big chunks of RAM.