Skip to content

Commit

Permalink
- Replaced CFUUID with NSProcessInfo's globallyUniqueString, - Fixed …
Browse files Browse the repository at this point in the history
…a memory leak & simplified the code
  • Loading branch information
nikita-zhuk committed Jun 4, 2011
1 parent 028ac58 commit d2b6ff9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mogenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ - (void)setModel:(NSString*)path;
}
assert(momc && "momc not found");

tempMOMPath = [[NSTemporaryDirectory() stringByAppendingPathComponent:[(id)CFUUIDCreateString(kCFAllocatorDefault, CFUUIDCreate(kCFAllocatorDefault)) autorelease]] stringByAppendingPathExtension:@"mom"];
tempMOMPath = [[NSTemporaryDirectory() stringByAppendingPathComponent:[[NSProcessInfo processInfo] globallyUniqueString]] stringByAppendingPathExtension:@"mom"];

This comment has been minimized.

Copy link
@nzhuk

nzhuk Jun 11, 2011

Owner

Test comment

system([[NSString stringWithFormat:@"\"%@\" \"%@\" \"%@\"", momc, path, tempMOMPath] UTF8String]); // Ignored system's result -- momc doesn't return any relevent error codes.
path = tempMOMPath;
}
Expand Down

0 comments on commit d2b6ff9

Please sign in to comment.