Garbage collector ios/android

Hi every one.

I make a game for flash/android/ios.

And I have trouble with big size textures (4096x4096) in memory for mobile versions.

cpp.vm.Gc.run(true) - didn’t work on android/ios targets, but works fine on windows target.

I need a function like dumpBits on “openfl-legacy”.

I will be grateful for any help.

You’re looking for troubles with such a big texture. Can’t you work with smaller ones? 2048x2048 is kind of the de facto max size on mobile

2048x2048 textures works fine. But I need to use such a big texture for retina display divices. And as I know, devices can be 4K display.

I know it’s been a while, but I’ve worked up an alternative to the dumpBits API

var bitmapData = new BitmapData (100, 100);
bitmapData.dispose (false);
trace (bitmapData.readable); // false

This is making subtle changes to the Flash API in this area, so I’m very interested in feedback. The idea is that readable is false for a BitmapData you cannot read/write to (it has a GPU texture, and no software representation) and no longer works with bitmapData.draw or sprite.graphics.beginBitmapFill, but can be used in Bitmap, Tilemap and similar APIs.

dispose (true) would behave as the Flash API (default is true) which disposes of data and GPU textures