1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Don't use auto-release pool and manually release created NSString*

This commit is contained in:
Leo Franchi 2012-06-08 09:14:49 +02:00
parent 658f919104
commit e36ea3b263
2 changed files with 6 additions and 3 deletions

View File

@ -85,9 +85,7 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
+ (void)performMoveWithInfo:(NSDictionary *)info
{
// *** GETS CALLED ON NON-MAIN THREAD!
CAutoreleasePool _p;
// *** GETS CALLED ON NON-MAIN THREAD!
NSString* fromPath = [info objectForKey: TKCopySourceKey];
NSString* toPath = [info objectForKey: TKCopyDestinationKey];
@ -204,6 +202,9 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:success], TKInstallerResultKey, [info objectForKey:TKInstallerDelegateKey], TKInstallerDelegateKey, error, TKInstallerErrorKey, nil];
[self notifyDelegate:dict];
[fromPath release];
[toPath release];
}

View File

@ -61,6 +61,8 @@
if ( receiver )
QMetaObject::invokeMethod(receiver, "installSucceeded", Qt::DirectConnection, Q_ARG(QString, path));
[target release];
}
- (void)moveFailedWithError:(NSError *)error