So basically a simple test of loading a prefab (spineboy) and then destroying it and releasing the resource. This is repeated again and again. On iOS, the memory will slowly but surely climb.
However if I do not release the prefab, or not do cc.loader.setAutoReleaseRecursively(prefab, true); Then this will never happen and the memory is stable.
Can anyone look into this? I have a project in which resources are constantly destroyed, released and reloaded, sooner or later, it would cause the device to crash.
Hi!
Does forcing garbage collection once in a while prevent it from crashing? I don’t work with iOS builds, but from what I have seen here in the forum. it looks like GC strategy is messed up in iOS builds.
I dont think we should be actively forcing it to garbage collect, but at this moment, if we don’t do it and allow the memory to grow, it might get out of hand and the last minute memory warning would not help as the garbage collector does not immediately execute when called.