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 4101048
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:38:46+00:00 2026-05-20T20:38:46+00:00

I have some memory issue with my iPhone application and I have no clue

  • 0

I have some memory issue with my iPhone application and I have no clue what is happening.

So, I observed that the memory usage of the application is rising continuously when going from an UIViewController to another. I have used the “Mark Heap” tool from the “Allocations” instrument and it seams that the only objects that are not deallocated are my UIViewControllers.

To be more specific I have let take my two UIViewControllers. The first one is named PuzzleViewController and the second one is named Options. When the app starts, the PuzzleViewController appears. I mark a heap here, to set a baseline, and after this I press the “Options” button which will present the Options UIViewController. I go back to the first one and I mark a heap again. After repeating these steps over and over again (like 20 times or so :D) I observe that after every Heapshot I have about 22 objects remaining alive. Two of those objects are instances of my UIViewControllers.

I really don’t have any clue what is happening.

Here is how I switch to the Options UIViewController:

- (IBAction) onOptionsButton: (id) sender
{
    Options *viewController = [[Options alloc] init];
    [self presentModalViewController:viewController animated:YES];
    [viewController release];
}

And here is how I go back to the PuzzleViewController:

- (IBAction) onMainMenu:(id) sender
{   
    PuzzleViewController *modalView = [[PuzzleViewController alloc] init];
    [self presentModalViewController:modalView animated:YES];
    [modalView release];
}

My viewDidUnload functions are called properly, but no dealloc function is ever called.

Thank you,
Andrei

  • 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-20T20:38:47+00:00Added an answer on May 20, 2026 at 8:38 pm

    You should call dismissModalViewController, not presentModalViewController again, nor recreate your PuzzleViewController.

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

Sidebar

Related Questions

I have an other active question HERE regarding some hopeless memory issues that possibly
I have some Java code that is throwing out of memory exceptions after running
I have some C code that stores ASCII strings in memory as a four
I have some legacy code that was used to monitor my applications cpu,memory etc
I am working on a memory matching game. I have some code that checks
I have a case here that I would like to have some opinions from
I have some unit tests set up in my PowerBuilder application that run through
I having some memory issue with Java and Swing. I have a JTextArea (same
I have been using this code, but have been running into some memory issues:
We have a couple of sites which have some memory problems and fairly often

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.