mirror of
https://github.com/transmission/transmission.git
synced 2026-05-02 14:42:37 +01:00
Transition to ARC
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
if ((self = [super initWithWindowNibName: @"AddMagnetWindow"]))
|
||||
{
|
||||
fTorrent = torrent;
|
||||
fDestination = [[path stringByExpandingTildeInPath] retain];
|
||||
fDestination = [path stringByExpandingTildeInPath];
|
||||
|
||||
fController = controller;
|
||||
|
||||
@@ -165,9 +165,7 @@
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
|
||||
[fDestination release];
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (Torrent *) torrent
|
||||
@@ -271,7 +269,7 @@
|
||||
[fTorrent startTransfer];
|
||||
|
||||
[self close];
|
||||
[fController askOpenMagnetConfirmed: self add: YES]; //ensure last, since it releases this controller
|
||||
[fController askOpenMagnetConfirmed: self add: YES];
|
||||
}
|
||||
|
||||
- (void) setDestinationPath: (NSString *) destination determinationType: (TorrentDeterminationType) determinationType
|
||||
@@ -279,8 +277,7 @@
|
||||
destination = [destination stringByExpandingTildeInPath];
|
||||
if (!fDestination || ![fDestination isEqualToString: destination])
|
||||
{
|
||||
[fDestination release];
|
||||
fDestination = [destination retain];
|
||||
fDestination = destination;
|
||||
|
||||
[fTorrent changeDownloadFolderBeforeUsing: fDestination determinationType: determinationType];
|
||||
}
|
||||
@@ -290,7 +287,6 @@
|
||||
|
||||
ExpandedPathToIconTransformer * iconTransformer = [[ExpandedPathToIconTransformer alloc] init];
|
||||
[fLocationImageView setImage: [iconTransformer transformedValue: fDestination]];
|
||||
[iconTransformer release];
|
||||
}
|
||||
|
||||
- (void) setGroupsMenu
|
||||
@@ -317,7 +313,6 @@
|
||||
if ([[alert suppressionButton] state] == NSOnState)
|
||||
[[NSUserDefaults standardUserDefaults] setBool: NO forKey: @"WarningFolderDataSameName"];
|
||||
|
||||
[alert release];
|
||||
|
||||
if (returnCode == NSAlertSecondButtonReturn)
|
||||
[self performSelectorOnMainThread: @selector(confirmAdd) withObject: nil waitUntilDone: NO];
|
||||
|
||||
Reference in New Issue
Block a user