lua-users home
lua-l archive

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


> 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