various negligible cleanup

This commit is contained in:
Mitchell Livingston
2007-08-14 05:21:02 +00:00
parent f69012d0e7
commit 7ddc2b64cd
8 changed files with 28 additions and 38 deletions
-1
View File
@@ -958,7 +958,6 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy
didEndSelector: @selector(urlSheetDidEnd:returnCode:contextInfo:) contextInfo: nil];
}
#warning combine
- (void) openURLEndSheet: (id) sender
{
[fURLSheetWindow orderOut: sender];
-1
View File
@@ -159,7 +159,6 @@
- (void) dealloc
{
[fPath release];
if (fLocation)
[fLocation release];
if (fInfo)
-2
View File
@@ -74,9 +74,7 @@
{
[fBackBadge release];
if (fBadge)
[fBadge release];
if (fAppIcon)
[fAppIcon release];
[fMainLineAttributes release];
-2
View File
@@ -28,7 +28,6 @@
- (void) setBackgroundImage: (NSImage *) image
{
if (fBackgroundColor)
[fBackgroundColor release];
fBackgroundColor = [[NSColor colorWithPatternImage: image] retain];
@@ -37,7 +36,6 @@
- (void) dealloc
{
if (fBackgroundColor)
[fBackgroundColor release];
[super dealloc];
}
-6
View File
@@ -115,11 +115,8 @@
- (void) dealloc
{
if (fTorrents)
[fTorrents release];
if (fPeers)
[fPeers release];
if (fFiles)
[fFiles release];
[super dealloc];
@@ -127,7 +124,6 @@
- (void) updateInfoForTorrents: (NSArray *) torrents
{
if (fTorrents)
[fTorrents release];
fTorrents = [torrents retain];
@@ -286,7 +282,6 @@
//set file table
[fFileOutline deselectAll: nil];
if (fFiles)
[fFiles release];
fFiles = [[torrent fileList] retain];
@@ -435,7 +430,6 @@
[fDownloadingFromField setStringValue: active ? [NSString stringWithInt: [torrent peersSendingToUs]] : @""];
[fUploadingToField setStringValue: active ? [NSString stringWithInt: [torrent peersGettingFromUs]] : @""];
if (fPeers)
[fPeers release];
fPeers = [[[torrent peers] sortedArrayUsingDescriptors: [self peerSortDescriptors]] retain];
+11 -9
View File
@@ -151,21 +151,14 @@
[fGreen2Piece release];
[fGreen3Piece release];
if (fTorrent)
[fTorrent release];
[super dealloc];
}
- (void) setTorrent: (Torrent *) torrent
{
if (fTorrent)
{
[fTorrent release];
if (!torrent)
fTorrent = nil;
}
if (torrent)
{
fTorrent = [torrent retain];
@@ -192,7 +185,12 @@
}
else
{
[self setImage: [[fBack copy] autorelease]];
fTorrent = nil;
NSImage * newBack = [fBack copy];
[self setImage: newBack];
[newBack release];
[self setNeedsDisplay];
}
}
@@ -203,7 +201,11 @@
return;
if (first)
[self setImage: [[fBack copy] autorelease]];
{
NSImage * newBack = [fBack copy];
[self setImage: newBack];
[newBack release];
}
NSImage * image = [self image];
int8_t * pieces;