1
以下のコードが漏れます。私は戻り前にnewCopyを自動リリースする必要がありますか?copyWithZoneの漏れ
- (id) copyWithZone:(NSZone *)zone {
Group *newCopy;
newCopy = [[[self class] allocWithZone:zone] init];
newCopy.groupName = [[[self groupName] copy] autorelease];
for (int i=0; i < [[self linkArray] count]; i++) {
[[newCopy linkArray] addObject:[[[[self linkArray] objectAtIndex:i] copy] autorelease]];
}
return newCopy;
}
何かによって漏れますか? –
リークス機器 –