hi All,
I’m using the Director class 1.4 for my game. I’m add in some more module inside(flurry / inneractive). I need to monitor closely on the memory resource on my app.
I find some code in this forum to monitor the memory.
[code]
collectgarbage()
print( "MemUsage: " … collectgarbage(“count”) )
local textMem = system.getInfo( “textureMemoryUsed” ) / 1000000
print( "TexMem: " … textMem )
[code]
Base on this code I find a memory issue with director class.
The case is like this. I have following structure:
Main.lua >> Maingame.lua >> stage001.lua,stage002.lua and stage003.lua
stage 001, 002 and 003 will call from Maingame.lua.
I find the memory status is:
- from Main.lua to Maingame.lua MemUsage : 327 TexMem : 33
- from Maingame.lua to stage001 MemUsage : 409 TexMem : 63
- Re-play in stage001 MemUsage : 431 TexMem : 30
I find out the stage001 actually only use up 431 and 30.
That is why the “2” case is memory stack up from Maingame with stage001 together. I already done all clean function include object and eventlistener.
Is it a bug of director or corona sdk?
Any workaround on this? My app crush a lot after adding (flurry and inneractive). I think one of the issue is memory go up a lot.
KC
[import]uid: 94613 topic_id: 28288 reply_id: 328288[/import]