Permalink
Browse files

code review of CFRelease usage, minor changes

  • Loading branch information...
1 parent 36b7d43 commit 756b37d4a5d470e851361f54985e2a39cc032369 Sean McBride committed Jan 5, 2010
Showing with 7 additions and 4 deletions.
  1. +5 −2 SUDiskImageUnarchiver.m
  2. +2 −2 SUHost.m
View
@@ -33,9 +33,12 @@ - (void)extractDMG
if (uuid)
{
CFStringRef uuidString = CFUUIDCreateString(NULL, uuid);
+ if (uuidString)
+ {
+ mountPoint = [@"/Volumes" stringByAppendingPathComponent:(NSString*)uuidString];
+ CFRelease(uuidString);
+ }
CFRelease(uuid);
- mountPoint = [@"/Volumes" stringByAppendingPathComponent:(NSString*)uuidString];
- CFRelease(uuidString);
}
}
while (noErr == FSPathMakeRefWithOptions((UInt8 *)[mountPoint fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &tmpRef, NULL));
View
@@ -108,8 +108,8 @@ - (BOOL)isBackgroundApplication
{
ProcessSerialNumber PSN;
GetCurrentProcess(&PSN);
- NSDictionary * processInfo = (NSDictionary *)ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask);
- BOOL isElement = [[processInfo objectForKey:@"LSUIElement"] boolValue];
+ CFDictionaryRef processInfo = ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask);
+ BOOL isElement = [[(NSDictionary *)processInfo objectForKey:@"LSUIElement"] boolValue];
if (processInfo)
CFRelease(processInfo);
return isElement;

0 comments on commit 756b37d

Please sign in to comment.