Re: Why shouldn't I release?
Re: Why shouldn't I release?
- Subject: Re: Why shouldn't I release?
- From: Andrew Farmer <email@hidden>
- Date: Fri, 30 Nov 2007 19:02:08 -0800
On 30 Nov 07, at 18:54, Ric L. wrote:
This doesn't make any sense to me. By my reckoning, stringWithFormat
should create a string with a retain count of 1. 'fLetterCountField
setStringValue' should assign the string to the field and the field
should retain the string. I should then be free to release it.
Read the Cocoa memory management rules [1]. "stringWithFormat" doesn't
fit the criteria of the fundamental rule, so the object it returns
isn't yours to release.
[1]: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html
_______________________________________________
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