Force cache clear from AssetManager

Well basically is there a way to force the assetManager to forget everything cached? (Quite usefull for level changes, since the old level mesh and textures will not be used again).

Also allowing to force a specific asset might be very intresting in relation to the terrain grid. (Force forgetting of textures related to unloaded quads to have ram free for the stuff actually needed.

DesktopAssetManager.clearCache()

1 Like

AH great, one question tho, is there a reason this is in the Destop assetmanager and not in the generic one (like the android one is that much different that it cannot clear caches)?

Yeah, Kirill was talking about the android one not caching etc… anyway he removed it immediately when I moved it to the AssetManager interface once ^^

I removed it? I don’t remember.

One reason it didn’t make it in: some asset types like textures support “smart caching”, which means the asset itself could get garbage collected when the system is low on memory.