Bengismo, that's extremely messy code - it was a series of tests; started with one then moved to another so the code altered slightly, and so forth. I hear what your saying but completely don't accept it as it runs equally as fast on a mobile, and still faster than loading images - the thread has extensive results, and each new result is basically a new version of this play code.
In the end I built it into my 2d space game and it was working fine - not releasing images would liekly just be left over code in this test....obviously in real life you would release images, but from what I recall it's alternating the loaded images there just to show that it's not just the efect of loading then releasing it, and loading it again so quickly it;s still in memory. Try it on a phone, would be very interested.
Would also love it if someone could get a plugin working....but actually we could do it with AppGameKit now if they would just give us PEEK/POKE and run time variable passing. I did it with DBPro - main .exe ran a second .exe and passed in a memory location (Matrix utils), so that the second app could then write a flag to that location that the main .exe picked up. Hey presto, communication between the apps. I had a game rumming in 3D with a background program loading music files over and over and it could manage something ridiculous like 1GB a minute comfortably with minimal frame rate hit.
So what we need is:
The ability to get the memory location of a memblock
The ability to get a free memory location
The ability to read/write to a memory location
The ability to make a memblock from a memory lcoation
That's really it. Then main.exe starts the second, passes a memory location they can use to "talk" (similar to network code). Then the main .exe can pass the name of an image needing loaded, the second .exe then loads it and makes a memblock, passes the start back. Main exe then converts said memblock into an image and bobs your uncle.
Or to be more perfect.....allow two .exe files, or a second process, to share image memory so the image loaded via the second is available to the first. Main processreserves the memory, second fills it, first uses it.
I;ve asked for this in EVERY survey! Lol. I actually still have matrix utils .dll that does almost all of that if anyone wants a bash at the plugin....sure that would sell.