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

  • Home
  • SEARCH
  • 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 215181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:26:46+00:00 2026-05-11T18:26:46+00:00

Ok…… I’m implementing a simple OpenGL ES application on the iPhone and I recently

  • 0

Ok……

I’m implementing a simple OpenGL ES application on the iPhone and I recently added in Pinch Media Analytics. Doing this helped uncover a memory management problem, and I’m not entirely sure how to deal with it.

In a perfect world, my application – which loads PNGs and .CAF files in didFinishLoading will launch, load all of it’s resources, and run just fine.

HOWEVER, if my program gets a crash (which happened as I was integrating the Pinch Media libraries) or if I run Safari and open a bunch of pages and then launch my game, the game will crash back to the menu because it is out of memory.

This problem will persist until I do a hard reset of the system.

The default answer that you sort of get online is to implement the didReceiveMemoryWarning method as listed below….

- (void)didReceiveMemoryWarning
{ 
  // default behavior is to release the view if it doesn't have a superview.

  // remember to clean up anything outside of this view's scope, such as
  // data cached in the class instance and other global data.
  [super didReceiveMemoryWarning];
}

But this doesn’t really help as it’s the other programs that are holding onto memory not mine. I don’t want to release my own view do I? Is there a good description of how to handle this situation and / or what happens in the didReceiveMemoryWarning event?

  • 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-05-11T18:26:47+00:00Added an answer on May 11, 2026 at 6:26 pm

    If you only have a single view, then the only thing you can do really is to release any data you are not using, and lazy load them later.

    If you have more than a single view, then they might be released if they are not visible. If this happens, the corresponding controller will be sent setView: with nil. I handle this happening by immediately releasing all IBOutlet variables so they are set properly when the view is loaded from its xib again.

    This is the approach I take in a normal, non-OpenGL ES application which has >6 views, and works consistently even when I am 4 levels deep in a navigation view and all previous controllers have their views set to nil – there is no crash when I navigate backwards, though there is a delay as views are reloaded.

    If you haven’t found it already, in the simulator there is a menu item to simulate a memory warning, which is easier than forcing the condition to occur in a real device. That said, it does not replace testing the same scenario in a real device – just makes testing easier.

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

Sidebar

Ask A Question

Stats

  • Questions 177k
  • Answers 177k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer It looks like you want to use Directory.GetFiles() in the… May 12, 2026 at 3:32 pm
  • Editorial Team
    Editorial Team added an answer You might not have IIS setup properly on the local… May 12, 2026 at 3:32 pm
  • Editorial Team
    Editorial Team added an answer nth-child is indeed the CSS way. In pure CSS, the… May 12, 2026 at 3:32 pm

Related Questions

OK. This is a bit of a vanity app, but I had a situation
OK, I know what you're thinking, "why write a method you do not want
Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't
OK. This problem is doing my head in. And I don't know if there
OK, this kind of follows on from my previous question . What I would

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.