simplify Torrent's dealloc

This commit is contained in:
Mitchell Livingston 2007-07-01 15:18:03 +00:00
parent 432c26d353
commit 2e599065ff
2 changed files with 23 additions and 29 deletions

View File

@ -69,7 +69,7 @@
[paragraphStyle setLineBreakMode: NSLineBreakByTruncatingTail];
BOOL highlighted = [self isHighlighted] && [[self highlightColorWithFrame: cellFrame inView: controlView]
isEqual: [NSColor alternateSelectedControlColor]];
isEqual: [NSColor alternateSelectedControlColor]];
NSDictionary * nameAttributes = [[NSDictionary alloc] initWithObjectsAndKeys:
highlighted ? [NSColor whiteColor] : [NSColor controlTextColor], NSForegroundColorAttributeName,
[NSFont messageFontOfSize: 12.0], NSFontAttributeName,

View File

@ -192,41 +192,35 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
- (void) dealloc
{
#warning cleanup
if (fHandle)
{
if (fDownloadFolder)
[fDownloadFolder release];
if (fIncompleteFolder)
[fIncompleteFolder release];
[fDownloadFolder release];
[fIncompleteFolder release];
if (fPublicTorrentLocation)
[fPublicTorrentLocation release];
[fPublicTorrentLocation release];
[fDateAdded release];
[fDateCompleted release];
[fDateActivity release];
[fDateAdded release];
if (fDateCompleted)
[fDateCompleted release];
if (fDateActivity)
[fDateActivity release];
[fAnnounceDate release];
if (fAnnounceDate)
[fAnnounceDate release];
[fIcon release];
[fIconFlipped release];
[fIconSmall release];
[fIcon release];
[fIconFlipped release];
[fIconSmall release];
[fProgressString release];
[fStatusString release];
[fShortStatusString release];
[fRemainingTimeString release];
[fProgressString release];
[fStatusString release];
[fShortStatusString release];
[fRemainingTimeString release];
[fFileList release];
[fFlatFileList release];
[fFileList release];
[fFlatFileList release];
[fBitmap release];
[fBitmap release];
if (fPieces)
free(fPieces);
}
[super dealloc];
}