lua-users home
lua-l archive

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


RLake:
> We have a memory leak, even though we're using a garbage collector and
> this was precisely the sort of problem that garbage collectors were
> intended to solve: dealing with circular references.

Roberto Ierusalimschy:
> You may not like how Lua works in that case, but that does not make it
> a memory leak. As long as both objects are reacheable from the program
> (root set), "fail" to collect them cannot be a leak.

Roberto, a hyperthetical question for you...

If an object were accessible ONLY by Weak links and the GC continually
refused to collect that object then would you consider that a "Memory
Leak"... or at least an "undesirable behaviour"?

*cheers*
Peter Hill