1
아래 코드가 누출됩니다. 반환하기 전에 autoreleasing 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;
}
무엇에 따라 누수가 발생합니까? –
누수 도구에 따르면 –