[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: GC of external resources
- From: Glenn Maynard <glenn@...>
- Date: Fri, 1 Dec 2006 22:35:08 -0500
On Fri, Dec 01, 2006 at 10:30:32PM -0500, Diego Nehab wrote:
> I forget what is the standard solution to make Lua's GC
> aware of the external cost of a "userdata" value. Sometimes
> you have a userdata representing, say, an image. But the
> image itself takes more room than the userdata because it
> was allocated outside of Lua (sometimes you can't change
> that). So Lua might not feel like collecting the userdata
> eventhough it represents a lot of memory and is not
> referenced anymore.
> Can anyone refresh my memory?