• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How are views supposed to reload after being nillified by memory warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How are views supposed to reload after being nillified by memory warnings?


  • Subject: Re: How are views supposed to reload after being nillified by memory warnings?
  • From: David Duncan <email@hidden>
  • Date: Fri, 02 Mar 2012 10:17:43 -0800

On Mar 2, 2012, at 1:28 AM, G S wrote:

> It's the photo-picker (actually a view that presents the photo picker and
> then lets the user add a caption).  It's presented with
> presentModalViewController and dismissed by the delegate, as is typical.
>
> The Apple photo picker often results in memory warnings (based on various
> forum posts I've seen).  It's after the dismissal of the picker's owning
> controller that the white screen is revealed.


In the vast majority of cases where I've seen this behavior, it is because in your delegate handler for the UIImagePickerController, you assign the returned image directly to a UIImageView that you have in your view hierarchy. If you've recently gotten a memory warning, then this image view is either nil, or will be released very soon, and you will end up with a view that has no image.

If this does turn out to be the case, then lesson learned is "never store critical data in my views".
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: How are views supposed to reload after being nillified by memory warnings?
      • From: G S <email@hidden>
References: 
 >Re: How are views supposed to reload after being nillified by memory warnings? (From: G S <email@hidden>)
 >Re: How are views supposed to reload after being nillified by memory warnings? (From: Roland King <email@hidden>)
 >Re: How are views supposed to reload after being nillified by memory warnings? (From: G S <email@hidden>)

  • Prev by Date: Re: Round corners of borderless NSWindow without set it transparent
  • Next by Date: Question on handling very large images
  • Previous by thread: Re: How are views supposed to reload after being nillified by memory warnings?
  • Next by thread: Re: How are views supposed to reload after being nillified by memory warnings?
  • Index(es):
    • Date
    • Thread