Skip navigation.
 
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)
FROM : Erik Buck
DATE : Tue Nov 18 15:15:45 2008

If you write correct accessors for all outlets, then the retain/release memory management is entirely handled in one method.  the -set retains the new value and releases the old value.
 
Any confusion regarding memory management for IB outlets seems to stem from failure to write the accessors and reliance on syntactic sugar.  Just remember that
 
@property (nonatomic, retain) IBOutlet UILabel *label;
 
results in synthesis of the appropriate accessor methods.  It does nothing more than save you some typing and document your intention.  The -set method that results from the above property declaration retains the new value and releases the old value.  The memory management is therefore all handled in one place just the way it should be and the way you want.
 
So what's the problem again ?

Related mailsAuthorDate
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Erik Buck Nov 18, 15:15
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Brian Stern Nov 18, 19:01
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Greg Titus Nov 18, 19:19
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Brian Stern Nov 18, 19:39
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) mmalcolm crawford Nov 19, 09:59
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Brian Stern Nov 19, 16:00
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Greg Titus Nov 19, 16:29
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Brian Stern Nov 19, 17:13
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Ricky Sharp Nov 19, 22:41
mlRE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Jeff Laing Nov 19, 22:57
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) Brian Stern Nov 19, 22:57
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) mmalcolm crawford Nov 19, 23:04
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) j o a r Nov 19, 23:11
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) mmalcolm crawford Nov 19, 23:18
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Brian Stern Nov 19, 23:22
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Michael Ash Nov 19, 23:29
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) j o a r Nov 19, 23:31
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) mmalcolm crawford Nov 19, 23:41
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects) mmalcolm crawford Nov 19, 23:44
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Ricky Sharp Nov 20, 00:05
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) j o a r Nov 20, 00:12
mlRE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Jeff Laing Nov 20, 00:39
mlRE: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects) Jeff Laing Nov 20, 00:39
mlRe: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects) Roland King Nov 20, 01:28
mlRE: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects) Jeff Laing Nov 20, 01:55
mlRe: Outlets / IBOutlet declarations (was Re: InterfaceBuilder &Wiring Objects) j o a r Nov 20, 01:58
mlRe: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects) Michael Ash Nov 20, 05:40
mlUsing properties (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 20, 05:53
mlRe: Using properties (was Re: Outlets / IBOutlet declarations) Michael Ash Nov 20, 17:50
mlResponding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 22, 01:53
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Ricky Sharp Nov 22, 02:21
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 22, 02:31
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) James Montgomerie Nov 22, 16:58
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 22, 17:16
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 22, 17:29
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) James Montgomerie Nov 22, 17:31
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) James Montgomerie Nov 22, 17:34
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Alexander Spohr Nov 22, 18:30
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalcolm crawford Nov 23, 21:10
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) James Montgomerie Feb 19, 21:18
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 19, 21:34
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Ricky Sharp Feb 19, 22:41
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 19, 22:52
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) James Montgomerie Feb 19, 22:57
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Ricky Sharp Feb 19, 22:59
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 19, 23:01
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Ricky Sharp Feb 19, 23:03
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 19, 23:03
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 20, 04:18
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Alexander Spohr Feb 20, 10:05
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 20, 10:50
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Jonathan Hess Feb 25, 00:44
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Frédéric Testuz Feb 25, 18:35
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) mmalc Crawford Feb 25, 18:37
mlRe: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations) Frédéric Testuz Feb 25, 20:28