Skip navigation.
 
mlRe: Why shouldn't I release?
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

Related mailsAuthorDate
mlWhy shouldn't I release? Ric L. Dec 1, 03:54
mlRe: Why shouldn't I release? j o a r Dec 1, 03:58
mlRe: Why shouldn't I release? Andrew Farmer Dec 1, 04:02
mlRE: Why shouldn't I release? Ric L. Dec 1, 04:06
mlRe: Why shouldn't I release? Hank Heijink Dec 1, 04:15
mlRe: Why shouldn't I release? stephen joseph but… Dec 1, 04:28
mlRe: Why shouldn't I release? Frank Weinstock Dec 1, 04:40
mlRe: Why shouldn't I release? I. Savant Dec 1, 05:08