• 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: UIViewControllers being reloaded on didReceiveMemoryWarning... ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIViewControllers being reloaded on didReceiveMemoryWarning... ?


  • Subject: Re: UIViewControllers being reloaded on didReceiveMemoryWarning... ?
  • From: Chris Parker <email@hidden>
  • Date: Wed, 13 Apr 2011 16:42:40 -0700

On 13 Apr 2011, at 4:14 PM, Martin Linklater wrote:

> Hi - I'm working on latest iOS and when testing my code on an iPhone3G I sometimes get this log output:
>
> 2011-04-14 00:03:08.920 CRDev[18309:307] InGameViewController - viewDidUnload
> 2011-04-14 00:03:09.223 CRDev[18309:307] InGameViewController - viewDidLoad
> 2011-04-14 00:03:09.640 CRDev[18309:307] InGameViewController implementation of -viewDidUnload caused the view to be reloaded. This will adversely impact system performance.
> 2011-04-14 00:03:09.732 CRDev[18309:307] InGameViewController - didReceiveMemoryWarning
> 2011-04-14 00:03:09.745 CRDev[18309:307] InGameViewController - viewDidUnload
> 2011-04-14 00:03:09.781 CRDev[18309:307] InGameViewController - viewDidLoad
> 2011-04-14 00:03:09.934 CRDev[18309:307] InGameViewController implementation of -viewDidUnload caused the view to be reloaded. This will adversely impact system performance.
>
>
> Can anyone tell me what's causing this ? It's screwing up some of the child views and causing some subtle bugs...

The log is trying to help you out; -viewDidUnload is called when the view controller has discarded its view. The log is telling you that an implementation of -viewDidUnload is causing the view to be loaded again.

This can be caused by doing anything which accesses the -view property on the view controller inside the -viewDidUnload implementation.

Look around in InGameViewController's implementation of -viewDidUnload and see if you're doing anything that involves '[self view]' (or 'self.view' for you dot-syntax people :) ).

.chris

--
Chris Parker
iOS Frameworks (UIKit)
Apple Inc.


_______________________________________________

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

References: 
 >UIViewControllers being reloaded on didReceiveMemoryWarning... ? (From: Martin Linklater <email@hidden>)

  • Prev by Date: isDeletableFileAtPath: returns YES for locked files???
  • Next by Date: Preventing View Update in NSTableView
  • Previous by thread: Re: UIViewControllers being reloaded on didReceiveMemoryWarning... ?
  • Next by thread: Re: UIViewControllers being reloaded on didReceiveMemoryWarning... ?
  • Index(es):
    • Date
    • Thread