After making some tests and trying to find an answer in the forum I think spriteSheet:dispose()
frees nothing at least when your sprites are physics bodies. In our game we are using a lot
of different sheets and I want to release all I don’t need.
There is no reduction in our case…
Is this still the same problem :
And here is the link, sorry…
Can’t free texture memory when sprites have physics [import]uid: 12632 topic_id: 8074 reply_id: 28761[/import]
Ansca , please confirm the method spriteSheet:dispose() [import]uid: 12632 topic_id: 8074 reply_id: 28877[/import]
It definitely frees the memory in my game but I’m not using physics. Perhaps there’s a bug specific to physics bodies; I already know of memory leaks on physics bodies without using spritesheets (don’t know where ansca is on those bugs though.) [import]uid: 12108 topic_id: 8074 reply_id: 28935[/import]
Today I was testing a lot, its definitely a problem when you add a physics body to the sprite
sheet. Without physics the memory frees. The problem is, even when I remove the physics
body with Object:removeSelf() and after this set Object = nil, the method spriteSheet:dispose()
doesn’t work. What to do…?? [import]uid: 12632 topic_id: 8074 reply_id: 28955[/import]
As a workaround until Ansca fixes this bug, maybe you can set the physics body on another display object and simply move the sprite along with that other object. Then physics are never attached to the spritesheet itself.
Although there is a memory leak on addBody regardless of spritesheets, that leak is tiny.
Come to think of it, maybe both situations are really the same bug, that memory for any display object isn’t freed, but the leak just seems so much larger for spritesheets because the textures involved are so much larger. [import]uid: 12108 topic_id: 8074 reply_id: 28958[/import]
Hmm, nice idea for a workaround, but a lot of work in our game. I am a bit afraid that Ansca
needs a long time to fix this because its known since the middle of Oktober last year 
To release our game like this, I think it can be rejected because of this big memory leak. [import]uid: 12632 topic_id: 8074 reply_id: 28961[/import]