--- On Sun, 10/26/08, DKJ <[EMAIL PROTECTED]> wrote:

> On 26 Oct, 2008, at 12:09, Clark S. Cox III wrote:
> > You must do both, otherwise you will leak.
> 
> 
> I understand why I have to release the temp object, but why
> does it  
> leak if I don't set foregroundColor to nil as well?

Because otherwise there won't be a release to balance the retain in the in 
setForgroundColor:. See the docs on Objective-C memory management:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html

Cheers,
Chuck


      
_______________________________________________

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