Hello Petr,
I wasn't able to remove all leaks. Valgrind claims that there are
currenly some 250 KB leaked, and this leak occurs even if all you do is
enter the game and exit immediately.
My valgrind (1.0.4) reports 230k of these 250k as 'still reachable'. A
quick look showed that most of these are caused by static data. I
think we should not worry about it.
I did some additional valgrinding:
- some leaks were caused by missing virtual destructors. I think they
occur because some objects were allocated with 'new DerivedClass'
but free'd using 'delete BaseClass'.
- many leaks are from an lua-realloc function (but I don't understand
how they happen).