lua-users home
lua-l archive

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




2011/6/26 steve donovan <steve.j.donovan@gmail.com>
On Sat, Jun 25, 2011 at 6:32 PM, Xavier Wang <weasley.wx@gmail.com> wrote:
> Obj is a C++ class binding by tolua, it seems that memory2 and memory3 is
> the same! so I don't have my memory back, how do I make my memory back after
> collect?

Maybe try calling collectgarbage "collect" twice;  objects with __gc
get cleaned up on the next pass.

steve d.

I tried it, but it still some memory can not back:
 
          Memory: before for: total memory = 1710.259765625 KB
          Memory: before collect: total memory = 1831.9296875 KB
          Memory: After collect: total memory = 1831.630859375 KB
          Memory: After collect: total memory = 1804.232421875 KB