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:
@@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user