On Mar 5, 2012, at 3:40 PM, G S wrote:

> No. But if you've presented a modal view controller, your entire view 
> hierarchy (self.view) has been ripped out of the window, and if a memory 
> warning arrives, then self.view will be set to nil. What happens next depends 
> on if you implemented -viewDidUnload properly or if your view references are 
> strong or weak.
> 
> If they are strong and you did not implement -viewDidUnload properly, then 
> your view reference will be non-nil.
> 
> Not according to the Apple doc.  By the time viewDidUnload is called, the 
> view reference has already been set to nil:


I think you are confusing what I mean by "view reference" at the end there. 
Consider this interface:

@interface ViewController : UIViewController

@property (nonatomic, /* strong or weak */) UIView *subview;

@end;

My statement above refers to what happens to self.subview, not to self.view 
(hence why I used self.view the first time, then view reference the second 
time).
--
David Duncan

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to