Hi all!
for our game editor we need to load and release assets for build our game levels. For not sill in memory all texture we use cc.resources.load. The trouble; we have see that in browser the memory grow every time we change assets set, maybe the prev assets is not released… is it possible?
our steps are when we load and set assets:
1: cc.resources.load …
2: create objects from assets load
3: … use assets…
4: change assets
5: clear every objects created with assets
6: cc.assetManager.releaseAsset(object assets) for every assets
7: GOTO 1
now we have other trouble… when we load a new scene, the scene is not loaded correctly… missing many texture… the strange is that this texture are not loaded from cc.resources.load… few idea?
Thanks for help!
Check on the editor if the scene asset is marked as auto release assets. If it is, it will mark all the assets as dirty, and if you garbage collect them, they will be removed from memory
If you need to add this line to your code, note that it must be in the outermost layer of your code so that it can be executed before the engine initializing