[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Memory leak with lua ...
- From: Rob Kendrick <lua-l@...>
- Date: Tue, 24 Apr 2007 00:15:52 +0100
Saravanan Palanichami wrote:
> I seem to have a problem with memory in lua ...
> This piece of code seems suspect -->
> a) This just runs a command on the lua state
> b) When I run this over and over again, if I look at the totalbytes
> field in the lua state, it grows slowly. It does not increase for every
> run but does it every 10 or maybe 20 calls.
> c) I am using LUA 5.1 on a fedora core 2 box.
> Any help is appreciated ...
If you're using Linux, I highly recommend running your program through
Valgrind. It will tell you precisely where you allocate the memory
that's being leaked, if any is, as well as numerous other handy checks.
My experience tells me that Lua does not leak when used correctly.