diff --git a/objectivec/DiffMatchPatch.m b/objectivec/DiffMatchPatch.m index 580f265..86c3d31 100755 --- a/objectivec/DiffMatchPatch.m +++ b/objectivec/DiffMatchPatch.m @@ -189,7 +189,7 @@ - (id)copyWithZone:(NSZone *)zone { Patch *newPatch = [[[self class] allocWithZone:zone] init]; - newPatch.diffs = [[NSMutableArray alloc] initWithArray:self.diffs copyItems:YES]; + newPatch.diffs = [[[NSMutableArray alloc] initWithArray:self.diffs copyItems:YES] autorelease]; newPatch.start1 = self.start1; newPatch.start2 = self.start2; newPatch.length1 = self.length1;