[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua gc in games
- From: "Jens Wessling" <wessling@...>
- Date: Mon, 6 Aug 2001 08:29:14 -0400
>
> > Hopefully, things work out so that in a game you can wait to do a major
> > collection until you have the time to walk the entire heap
Why do you need to walk the entire heap? Every variable is reference
counted,
why not just add it to a "collection list" when the reference count reaches
zero,
then just walk the collection list at gc time? There would be issues with
memory
fragmentation, but that could be handled at a different time, or not at all.
8)