I have an app to deploy on iOS and Android. I’m currently having trouble with clearing the texture cache. I’m frequently adding and removing new large images to the scene, and to manage the images I’m calling
after a certain number of images have been created and removed, to keep memory at reasonable levels.
The problem is that sometimes on Android this will cause the app to completely stop responding to user input and to wreck the scheduled ::tick(ccTime dt) selector. Everything just freezes. There is one use case where it almost always happens, but it might happen randomly at other times too, and it is always caused by calling removeUnusedTextures()
Why does this happen on Android, but not iOS? How can I solve this problem?