Here's the problem - I'm making a sort of a player that displays multiple images as frames of animation. These images are at 800x600 resolution and there's hundreds of them. Animations are divided in groups. Some groups have 140 frames, others have 300. Now, around the sixth animation I get an error "Failed to create bitmap", and the RAM usage at that time is above 1,5GB. I've tried disposeing the sprite object (and it's bitmap too) and then reinitializing before starting next set of frames, but it really has no effect on memory usage. Any ideas on what to do with it would be great. Really :>
Thanks.
Edit: Ok, Some partial solution to this is loading the pictures with Bitmap.new() instead of using the RPG::Cache. This however causes some flickering at times, as the pictures aren't no longer... well... cached :] But at least it doesn't crash the whole thing. I'll keep trying but I'm also open for any ideas.
Edit2: Problem solved. RPG::Cache.clear works like magic
Thanks.
Edit: Ok, Some partial solution to this is loading the pictures with Bitmap.new() instead of using the RPG::Cache. This however causes some flickering at times, as the pictures aren't no longer... well... cached :] But at least it doesn't crash the whole thing. I'll keep trying but I'm also open for any ideas.
Edit2: Problem solved. RPG::Cache.clear works like magic