Corona Memory Usage

Hey guys!
I’ve been using Corona for quiet some time and have been following Jon Beebe and his usefull hints for Memory Management in Corona SDK.

Now I’ve been curious, since I noticed that there seems to be always a bit of chunk left in the memory and I wasn’t sure if that was my fault or not…
I made a little test to check if it really cleans the Memory:

[lua]function test(event)
collectgarbage()
print( "\nMemUsage: " … collectgarbage(“count”) )
end

test()

for i = 0,1000,1 do
local t = display.newRect(10,10,10,10)
t.myName = “peter”
t:addEventListener(“collision”,test)
t:removeEventListener(“collision”,test)
–t.myName = nil;
t:removeSelf();
t = nil;
collectgarbage(“collect”)
end

test()[/lua]

Like you see, it returns two diffrent values, even if it’s a tiny bit…

I want to know if I’m making something wrong or not. In a sidescrolling shooter on which I’m helping we figured out that our bullets are actually leaving a tiny bit more kb in the memory, even though we clearly remove them, there eventlisteners, nil there values and everything…
And I don’t know if those could actually make the app crash after quiet some time playing…

So if anyone has an idea let me know.

Thanks in advance,
Chris [import]uid: 13097 topic_id: 10707 reply_id: 310707[/import]