[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory leak with lua ...
- From: Stephen Kellett <lua@...>
- Date: Tue, 24 Apr 2007 00:49:15 +0100
My experience tells me that Lua does not leak when used correctly.
Indeed, many people that use GC'd languages think that memory leaks are
impossible, that garbage collection is a panacea.
The reality is that memory leaks still happen, but rather than the
explicit leaks that you get with C/C++/Pascal applications you get
implicit leaks (*) which happen when you forget to release a reference
to an object you no longer need. These unwanted objects loiter in the
memory space, using memory and referencing other objects that could also
We've made an attempt at this with Lua Memory Validator (Windows only,
so not relevant to the original poster) but sadly Lua doesn't provide
all the info we need to do this properly (like we have done for Java,
It appears at present that LMV gives better data with Lua 5.1 than Lua 5.0.
(*) also known as loiterers in the Java community - use a Google search
to find out more about these, they apply to Python, Ruby, Lua,