Hi,
I keep getting out of memory crashes when I’ve progressed a certain way through our game. It is asset heavy but android for example handles it fine. What can I do? I do also have 5 video assets. My only guess is the previous scenes aren’t being cleaned up.
Thanks
1 Like
yup so iOS definitely is not letting go of assets. and purgeCachedData isn’t doing squat.
jake72
March 2, 2017, 3:51am
#3
Have you read these tread?
Update on the issue, a quick check on the ccloader source file shows that the for array types ( as returned by getdependsrecursively) actually delegates the release work to auto-release-utils 's autorelease method.
Looking at the line 34 of the auto-release-utils script, the release of an asset is dependent on it being set to true for auto release.
And as my prefabs were dynamically generated, their asset keys were not populated into the autoReleaseSettings of the loader, and therefore were no…
I’m pretty sure about that. I tested switching back and forth 2 scene : Main Scene and Login Scene, no heavy task implemented there, memory keep increasing. My game started at 120mb then after switching a while, about 30 times, memory usage is 220 Mb
yes I have and I realised I needed to add to the autorelease pool any dynamically loaded assets.
cc.loader.setAutoReleaseRecursively(loadedPrefab, true);