• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Mac OSX Mac and iOS memory problems

I am having trouble with a game I've made that runs perfectly on Windows but behaves as though there is a memory leak somewhere on Mac and iOS. The memory usage on both apple platforms steadily increases every time I switch out sprites. I have an object that has an animated sprite and at the beginning of each "round" the sprite is changed and on Windows this doesn't cause any memory increase at all - the sprites have a lot of frames but are all of a similar size. However on Mac every time this happens the memory usage increases by about 20mb, and before long the whole thing is using a crazy amount of memory and crashing. I've narrowed it down to the texture swapping, I've made texture groups, I'm using draw_texture_flush() and while these things have helped they haven't fixed the fundamental problem. I have tried with fewer frames of animation and smaller images but nothing changes the problem of increasing memory. To reiterate, if I don't change the sprites there is no memory increase, it is literally only happening at that point.

It seems to me as though the memory isn't releasing the previous sprites and is loading up the new ones on top somehow but only on Mac/iOS.

Does anyone have any suggestions? Thank you in advance :)
 
Top