Memory Leak on cc.loader.release

Memory Leak on cc.loader.release
0.0 0


Have attached an example project. (443.9 KB)

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.


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.


Anyway, I think I got my answer on the chinese forum

apparently it is spine that is causing the memory leak


@pandamicro Hi, any update on this issue? 1.5.1 seems to still have the same issue