Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
- Subject: Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
- From: Brian Stern <email@hidden>
- Date: Mon, 17 Nov 2008 23:34:14 -0500
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 (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