Skip to content

Commit

Permalink
- Fixed memory leaks in MiscMerge
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-zhuk committed Jun 4, 2011
1 parent d2b6ff9 commit 4716a9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MiscMerge/MiscMergeTemplate.m
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,9 @@ - (void)parseContentsOfFile:(NSString *)filename
"*/
- (void)parseString:(NSString *)string
{
NSMutableString *accumString = [[[NSMutableString alloc] init] autorelease];
NSAutoreleasePool *localPool = [[NSAutoreleasePool alloc] init];
NSScanner *scanner = [NSScanner scannerWithString:string];
NSMutableString *accumString = [[NSMutableString alloc] init];
NSString *currString;
int nestingLevel = 0;
int maxNestingLevel = 0;
Expand Down
2 changes: 1 addition & 1 deletion MiscMerge/_MiscMergeIncludeCommand.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (BOOL)parseFromScanner:(NSScanner *)aScanner template:(MiscMergeTemplate *)tem
resolvedFilename = [template resolveTemplateFilename:filename];

if ([resolvedFilename length] > 0)
fileString = [[NSString alloc] initWithContentsOfFile:resolvedFilename];
fileString = [[[NSString alloc] initWithContentsOfFile:resolvedFilename] autorelease];

if (fileString)
{
Expand Down

0 comments on commit 4716a9c

Please sign in to comment.