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 been having some issues with LINQ-To-SQL around memory usage. I'm using it
I have some UI in VB 2005 that looks great in XP Style, but
We have some input data that sometimes appears with &nbsp characters on the end.
We have some files on our website that users of our software can download.
I've run into a problem with an iPhone core data application that I'm working
I have developed an application, when I test for Memory Leaks using Instruments, I
I have developed an iPhone application with Snow Leopard (10.6.2) and Xcode (3.2.1). As
I'm sorting out some memory issues with my iPhone app and I've just been
I have an app that is crashing on the iPhone, but only when it
Hey I seem to be having some kind of memory leak issue with my

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.