Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Fixed memory leaks in MiscMerge

  • Loading branch information...
commit 4716a9c43e656ea2fc38e3d9096b8e2f273de109 1 parent d2b6ff9
Nikita Zhuk authored
2  MiscMerge/MiscMergeTemplate.m
View
@@ -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;
2  MiscMerge/_MiscMergeIncludeCommand.m
View
@@ -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)
{
Please sign in to comment.
Something went wrong with that request. Please try again.