FROM : Andrew Farmer
DATE : Sat Dec 01 04:02:08 2007
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
DATE : Sat Dec 01 04:02:08 2007
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
| Related mails | Author | Date |
|---|---|---|
| Ric L. | Dec 1, 03:54 | |
| j o a r | Dec 1, 03:58 | |
| Andrew Farmer | Dec 1, 04:02 | |
| Ric L. | Dec 1, 04:06 | |
| Hank Heijink | Dec 1, 04:15 | |
| stephen joseph but… | Dec 1, 04:28 | |
| Frank Weinstock | Dec 1, 04:40 | |
| I. Savant | Dec 1, 05:08 |






Cocoa mail archive

