Open
Description
Just a vague idea, should probably only pertain to FlxGraphics, and not all assets, since it isn't currently possible.
The problem is that graphics are destroyed on state switch even when the next state uses them, destruction should be deferred, IMO
enum DebugCacheMode
{
/** The default value, graphics do not persist, and are destroyed when use-count hits 0 */
TRACK_USE;
/** graphics persist by default */
PERSIST;
/**
* Same as track use, but graphics are not immediately destroyed, but rather
* marked for destruction on a delay, unless the use count is incremented
*/
DEFERRED_TRACK_USE(delay:Float);
}
DEFERRED_TRACK_USE is the main draw of this, and should probably be added on it's own, first? Maybe that should be the default?