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

View File

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