[solved] Assets.loadBitmapData VS Assets.getBitmapData and Assets.cache.clear

edit : It takes sometimes up to 1 minute but it takes effect…

Hi there,

I’am new to OpenFL. I am making multimedia softs for museums and I used to work with Adobe Air.
I made some tests with OpenFL targeting Windows and I am seduced by the performance !

As a newbie, I encounter problems…

When I load a PNG sequence using Assets.getBitmapData, I can free the memory with Assets.cache.clear :slight_smile:

But when I do the same with Assets.loadBitmapData, Assets.cache.clear seems to have no effect. :frowning:

I can’t use Assets.getBitmapData because it’s a big PNG sequence updated on Enterframe and it needs to be fully loaded before the animation starts…

Thanks for your help !

The Haxe C++ target has a threshold it uses for garbage collection, if things are running well, and the memory use hasn’t gotten too high, it will delay running of the garbage collection to keep up performance :slight_smile:

1 Like

Thanks for the explanation!