Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Fix memory leak in Patch in Objective-C version #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion objectivec/DiffMatchPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down