1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 01:03:01 +00:00

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

@ -192,24 +192,16 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
- (void) dealloc - (void) dealloc
{ {
#warning cleanup
if (fHandle)
{
if (fDownloadFolder)
[fDownloadFolder release]; [fDownloadFolder release];
if (fIncompleteFolder)
[fIncompleteFolder release]; [fIncompleteFolder release];
if (fPublicTorrentLocation)
[fPublicTorrentLocation release]; [fPublicTorrentLocation release];
[fDateAdded release]; [fDateAdded release];
if (fDateCompleted)
[fDateCompleted release]; [fDateCompleted release];
if (fDateActivity)
[fDateActivity release]; [fDateActivity release];
if (fAnnounceDate)
[fAnnounceDate release]; [fAnnounceDate release];
[fIcon release]; [fIcon release];
@ -225,8 +217,10 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[fFlatFileList release]; [fFlatFileList release];
[fBitmap release]; [fBitmap release];
if (fPieces)
free(fPieces); free(fPieces);
}
[super dealloc]; [super dealloc];
} }