1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 06:07:37 +02: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

@@ -87,8 +87,6 @@ static BOOL AuthorizationExecuteWithPrivilegesAndWait(AuthorizationRef authoriza
{ {
// *** GETS CALLED ON NON-MAIN THREAD! // *** GETS CALLED ON NON-MAIN THREAD!
CAutoreleasePool _p;
NSString* fromPath = [info objectForKey: TKCopySourceKey]; NSString* fromPath = [info objectForKey: TKCopySourceKey];
NSString* toPath = [info objectForKey: TKCopyDestinationKey]; 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]; NSDictionary* dict = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:success], TKInstallerResultKey, [info objectForKey:TKInstallerDelegateKey], TKInstallerDelegateKey, error, TKInstallerErrorKey, nil];
[self notifyDelegate:dict]; [self notifyDelegate:dict];
[fromPath release];
[toPath release];
} }

View File

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