Permalink
Browse files

- Replaced CFUUID with NSProcessInfo's globallyUniqueString, - Fixed …

…a memory leak & simplified the code
  • Loading branch information...
1 parent 028ac58 commit d2b6ff9886225b7c69b83fc75c76597570a567ad @nikita-zhuk nikita-zhuk committed Jun 4, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 mogenerator.m
View
@@ -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"];
@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;
}

0 comments on commit d2b6ff9

Please sign in to comment.