You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should not be a problem where you load assets during a static loading screen as this is a good time to collect garbage anyway, however in a scenario where one uses multiple asset managers, some to load in assets during the app/game, this will force garbage collection during the game/app and potentially cause an undesirable fps drop.
the suggestion is to make this System.gc() call or even System.pauseForGCIfCollectionImminent(0); optional and in my opinion even disabled by default in the Assetmanager class directly provided with Starling - to avoid having to extend it just for that.
The text was updated successfully, but these errors were encountered:
Agreed! That code made sense for loading screens, but the AssetManager should be usable at any time within the game. I removed the GC code completely — it's better if the developer decides where to put this code in a case-by-case basis.
I moved the GC-code to the "onComplete" callbacks of the samples, to simply show how it's done as a best practice.
Hi !
Following the topic started by as3gpu and his findings here :
The issue is currently Assetmanager forces garbage collection (on Air apps or flash player debugger) with System.gc() here :
https://github.com/Gamua/Starling-Framework/blob/master/starling/src/starling/utils/AssetManager.as#L743
This should not be a problem where you load assets during a static loading screen as this is a good time to collect garbage anyway, however in a scenario where one uses multiple asset managers, some to load in assets during the app/game, this will force garbage collection during the game/app and potentially cause an undesirable fps drop.
the suggestion is to make this System.gc() call or even System.pauseForGCIfCollectionImminent(0); optional and in my opinion even disabled by default in the Assetmanager class directly provided with Starling - to avoid having to extend it just for that.
The text was updated successfully, but these errors were encountered: