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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T19:49:00+00:00 2026-05-29T19:49:00+00:00

Hi I have a nasty memory management issue under ARC and cannot figure out

  • 0

Hi I have a nasty memory management issue under ARC and cannot figure out how to solve it. The problem stands like this, I have these objects:

ObjectManager – a singleton that does fetchRequests to core data and fetches one or more NSManagedObjects

UIViewControllerA – a view controller in which I have a button “PassManagedObject” and a property declared as below:

@property (strong, nonatomic) ManagedObject *objectForToday;

in viewDidLoad on UIViewControllerA, I call the method refreshDailyObject which does this:

self.objectForToday = nil;
self.objectForToday  = [[ObjectManager sharedManager] getDailyObject];

if I tap the PassManagedObject button I create UIViewControllerB, pass the objectForToday to it and display it, see below

- (IBAction)passManagedObjectTapped:(id)sender {
       UIViewControllerB *viewController = [[UIViewControllerB alloc] initWithNibName:@"UIViewControllerB"];
       viewController.object = self.objectForToday;
       [self.navigationController pushViewController:viewController animated:NO];
 }

UIViewControllerB has a property declared like this:

@property (strong, nonatomic) ManagedObject *object;

and a button “Back” which does this:

- (IBAction)backAction:(id)sender {
    self.object = nil;
    [self.navigationController popViewControllerAnimated:NO];
}

Now the problem is this. If I tap continuously passManagedObjectTapped and then backAction, and again passManagedObjectTapped and again backAction and then again passManagedObjectTapped and automate this I’m getting eventually Received Memory Warning 1, and then crash.

The Instruments doesn’t show any leaks but my memory allocation keeps slowly going up.

I am using ARC under iOS4.3 & iOS5. I’ve been struggling to figuring out what is wrong for a day now. Any help will be highly appreciated.

Thanks!

  • 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-29T19:49:02+00:00Added an answer on May 29, 2026 at 7:49 pm

    The self.object = nil; and self.objectForToday = nil; isn’t necessary – ARC and the synthesized properties setters already take care of that.

    It seems pretty likely that you have a circular reference somewhere. Do you have any situations where object A has a strong reference to object B and object B has a strong reference to object A?

    If so, just change one of those references to weak instead (or assign if you want to support iOS 4.3).

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

Sidebar

Related Questions

Fellas! I have one nasty page to parse but can't figure out how to
My team and I have this nasty problem with parsing a string received from
I have encountered a rather nasty problem with the DataGridView control (Windows.Forms, .NET Framework
We have a nasty little problem. In short we can detect if a screen
I have a nasty problem. I want to get rid of a certain database
I have a very strange memory leak problem, it seems that sqlite3_step is doing
I have a problem related to parsing a SOAP message. This is the message:
I have just discovered a nasty memory leak using both each_array() and each_arrayref() from
I have a nasty problem referencing resources when using a Maven project and Jar
We have recently started using git and had a nasty problem when someone committed

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.