Transition to ARC

This commit is contained in:
Dmitry Serov
2017-07-29 23:14:22 +07:00
parent 6c30359beb
commit 845dfe6017
63 changed files with 335 additions and 767 deletions

View File

@@ -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];