On Nov 17, 2008, at 11:20 PM, Luke the Hiesterman wrote:


On Nov 17, 2008, at 8:17 PM, Brian Stern wrote:

I think it makes more sense to release the Outlets in viewDidLoad.

Why would you be releasing outlets when the view just loaded? Generally releasing happens when you're ready for something to go away....

There is an extra retain on the Outlets. It is unneeded. The outlets are sufficiently retained by the view hierarchy.

Either I have to release in both dealloc and in didReceiveMemoryWarning, or I can have them in viewDidLoad.

Release also is sent when you transfer ownership of an object to another object. I don't wish to have ownership of the outlets. They can be owned by the view hierarchy. So if I release them in viewDidLoad then I don't have to release them in two other places, which is obviously error prone.

Don't you find it odd that you need to release outlets in didReceiveMemoryWarning?
_______________________________________________

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

This email sent to [EMAIL PROTECTED]

Reply via email to