Tuesday, 3 September 2013

XCode: why do I get memory warnings with only 7 MB of memory allocated?

XCode: why do I get memory warnings with only 7 MB of memory allocated?

I am running my iOS App on iPod touch device and I get memory warnings
even if the total allocation peak is only 7 MB as shown below (this
happens when the Game Scene is pushed):

What I find strange is that:
the left peak (at time 0.00) corresponds to 20 MB of memory allocated
(Introduction Scene) and despite this DOES NOT give any memory warning.
the central peak (at time 35.00) corresponds to raughly 7 MB of memory
allocated (Game Scene is being pushed) and DOES give memory warning.
I do not understand why I get those warnings if the total memory is only 7
MB. Is this normal? How can I avoid this?

Looking at the allocation density we can see the following schema, which
(to me) does not show much difference between the moment when the Intro
Scene is being pushed (0.00) and the moment in which the Game Scene is
being pushed (35.00). Being the density peaks similar I would assume that
the memory warnings are due to something else that I am not able to spot.

No comments:

Post a Comment