Question: Releasing native Image resources
I'd love to get your thinking on how I can free up native Image resources once the JavaScript image objets are garbage-collected. It'll allow developers to load (and release) multiple SpriteSheets without crashing the device on a memory warning.
I hope I'm not missing something obvious.
Thanks, Amit
Ejecta should already free textures, once the Image objects are released by the GC.
You can also set an Image's src to an empty string if you don't want to wait for the GC. This will release the EJTexture object used by the Image:
img.src = '';
Oh that's wonderful.
For some reason it wasn't getting reset when GC picked up the img object (I'll post details if I can figure it out), however it works like a charm when I set img.src manually as you suggested.
Thank you!
PS - apologies for the duplicate issues, a silly mistake.