diff --git a/src/libtomahawk/mac/FileHelpers.mm b/src/libtomahawk/mac/FileHelpers.mm index 6757d4786..3e3c01d27 100644 --- a/src/libtomahawk/mac/FileHelpers.mm +++ b/src/libtomahawk/mac/FileHelpers.mm @@ -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]; } diff --git a/src/libtomahawk/utils/TomahawkUtils_Mac.mm b/src/libtomahawk/utils/TomahawkUtils_Mac.mm index fa82f9d76..28b03e0e3 100644 --- a/src/libtomahawk/utils/TomahawkUtils_Mac.mm +++ b/src/libtomahawk/utils/TomahawkUtils_Mac.mm @@ -61,6 +61,8 @@ if ( receiver ) QMetaObject::invokeMethod(receiver, "installSucceeded", Qt::DirectConnection, Q_ARG(QString, path)); + [target release]; + } - (void)moveFailedWithError:(NSError *)error