lua-users home
lua-l archive

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

Axel Kittenberger <> wrote:

> The last days, I've been thinking about Garbage Collection. However,
> I'm not experienced there, so I'd like to hear your opinion on this.

Have a look at this page if you are interested in GC:

> But what if creating objects on the stack which are hardly referenced
> at all would be made cheap, than it would be okay to work like this.
> [...] Couldn't this be used as advantage for the GC?

Yes, there are a number of GC techniques that are optimised on the
assumption that most objects are short-lived, such as "generational GC".

> It would be some variant of a reference counter that only knows, "zero",
> "one" or "many" references.

That's another well-known technique :-)

f.anthony.n.finch  <>
Viking, North Utsire, South Utsire, Northeast Forties: Easterly or
southeasterly 5 to 7, occasionally gale 8 at first except in North Utsire,
veering southerly 4 or 5. Moderate or rough becoming slight or moderate. Rain
with fog patches then fair. Moderate or good, occasionally very poor at first.