Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8074515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:40:33+00:00 2026-06-05T14:40:33+00:00

I am working on an iPhone game which receives memory warning that I am

  • 0

I am working on an iPhone game which receives memory warning that I am not experienced enough to interpret. I have been watching some iTunesU tutorial but I am still not very good at this..

I have received various memory leaks whilst running my game and I wanted to understand how to interpret the stack trace show in Instruments properly.

I attach a screenshot of the ObjectAllocation instrument output instruments output . Even when I zoom filter I don’t manage to filter the data in the ObjectSummary see this screenshot.

The peaks in memory usage in 1 happen when the GameScene is initialized and all the data is loaded (ParallaxBackground, CCSpriteBatchNode) and Sprites and bullets frames are created (in an CCArray of spriteFrames).

The big blue peak is just at load time but the app freezes and then crashes only after a while and from the graph I see that the memory usage (blue bar) has gone down.. so I don’t quiet get that. Also, whenver I try to use the leaks instrument the App crashes..

I know is a very silly question for someone experienced, but I just need some extra help getting started with this toolset.

I think the memory problem are due to the sprites I allocate in sprite cache classes, but I am not sure on this and hence wanted to investigate this using Instruments but can’t find out how to see what is the object causing the memory warning and how to access the stack trace..

PS: I am running on an iPod 4th generatio and I am using Cocos2D as library

EDIT: I do not also understand why if the Live Bytes are only 1.01 MB the App crashes and why I still receive a memory warning (see black flags). Is it due to some pointer referencing to some null variable or due to an excessive memory allocation? 1.01 MB doesn’t seem much to me..

EDIT 2: Following Marion’s advice I used the Activity Monitor and realized that the effective real memory usage is 55.39 MB. I misinterpreted the “live bytes” word. I will try to dig into this further and will leave the question as unaccepted for now to allow other people contribute. If I won’t have any other answer within one-two days I’ll mark as accepted the current answer. Thanks!

Activity Monitor

Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:40:35+00:00Added an answer on June 5, 2026 at 2:40 pm

    If you want to find leaks, use Leaks instrument instead of Allocations. To find out, how much memory use at the moment, use ActivityMonitor.

    If you will have problems with memory in cocos2d, you can try to purge cache. In cocos2d you can purge CCTextureCache, CCSpriteFrameCache, CCAnimationCache. It will release unused textures and frames.

    If you want to check if all of unnessesary textures were removed from memory, you can place breakpoint to CCTextureCache class and call, for example, sharedTextureCache and look throw the content of textures_ dictionary. Or add some method to this class to be able to dump current state of cache.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working with iPhone application in which i am using sqlite database.
I have been working on a game for iphone and have run into a
I am working on an iPhone game, which will have many types of creeps,
So I'm developing and iPhone game right now and everything has been working just
I've been working on an iPhone for several months. It's a 2d shooting game
I'm working on an iPhone game that uses the accelerometer for control. I don't
I am writing an iPhone game and have it working well with my level
I'm working on Facebook Canvas Game project together with iPhone Native Game App which
So I've been working on an iPhone 3D game, at the usual 320x480 resolution
I'm working on a game for iPhone which creates a path after your character

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.