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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:18:29+00:00 2026-05-28T17:18:29+00:00

I am trying to figure out why when my application gets a didReceiveMemoryWarning while

  • 0

I am trying to figure out why when my application gets a didReceiveMemoryWarning while the UIImagePickerController has control, the picker (and thus the delegate of the picker) is set to the deallocated viewcontroller?

View Controller one calls

self.postImagePicker = [[UIImagePickerController alloc] init];
self.postImagePicker.delegate = self;
self.postImagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
self.postImagePicker.allowsEditing = YES;
[self presentModalViewController:self.postImagePicker animated:YES];

Next, the UIImageViewController is displayed and an image is selected. Then simulate a memory warning. The view controller that presented the dialog gets a memory warning error and the picker is set to 0x0 (which means that the delegate is also now invalid).

I’m using ARC. Has something changed in the way that an UIImageViewController is called so that the view that presented it is not reloaded thus causing the pointer to the UIImageViewController to become invalid?

  • 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-28T17:18:30+00:00Added an answer on May 28, 2026 at 5:18 pm

    Check didReceiveMemoryWarning. Do you have self.postImagePicker = nil; there? Check the didReceiveMemoryWarning methods for your upstream view controllers. Do they have a reference to this view controller? If not, the navigation controller may be dumping this view controller. delegate is a weak reference, so it’s not enough to keep your view controller around if nothing else is.

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

Sidebar

Related Questions

Trying to figure out how to programmatically access the web pages in the application.
I'm trying to figure out how to redirect to a new page (different application,
I'm working on a client-server Android application and trying to figure out how to
Trying to figure out the best way to set up collection lists for users
I'm trying to figure out how to design a small application more elegantly, and
I'm trying to figure out how to solve the privilege acquisition. The application requires
I'm constructing a geolocation based application and I'm trying to figure out a way
I am trying to figure out how to get a Dashcode web application to
I am writing an application in C#/WPF and am trying to figure out how
Trying to figure out an equation to get the current group a page would

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.