Re: Initializing an Array
Re: Initializing an Array
- Subject: Re: Initializing an Array
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 22 Jan 2002 11:42:01 -0800
On Tuesday, January 22, 2002, at 10:57 AM, Jeff Galyan wrote:
- (id)initWithString:(NSString *)aString
{
myString = [aString copy];
[myString retain];
This is a leak. You don't need to -retain something that you've copied.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Software Engineer, Cocoa Evangelism
Apple Worldwide Developer Relations