[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Garbage collector issues
- From: Steve Dekorte <steve@...>
- Date: Tue, 19 Dec 2000 17:59:13 -0800
John Belmonte wrote:
> If it is a graphics app why not just call collectgarbage() once per frame to
> force collection?
That works, but doing a gc run is an expensive operation.
> Nicolas Devillard wrote:
> > I have a defined a userdata type (an image) that holds large quantities of
> > memory. Obviously, this data type should be garbage collected as soon as
> > possible to release resources.
The lua gc has a memory limit that you can set with the collectgarbage() function.
When it reaches it, it does a gc run. You might try setting this to be at the amount
of memory that you find acceptable for your program to take.