[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lua OO and garbage collector
- From: "Wim Couwenberg" <wcou@...>
- Date: Fri, 30 Jan 2004 16:38:01 +0100
> I write a simple OO program in lua. But I don't understand, why the
> objects keeps in memory after destruction...
I think it *was* neatly collected!
> 105 202
> 104 208
The first number (blocks in use) dropped see... The second number is just
the gc threshold which is set to at least two times the number of blocks in
use.
> function Square:show()
> moo=self.side
> print ("Side name is: "..moo.."\n");
> end
You probably want to change that to
local moo = self.side
--
Wim