mirror of
https://github.com/transmission/transmission
synced 2025-03-09 13:50:00 +00:00
fix small memory leak that has been around forever
This commit is contained in:
parent
b74cfa9358
commit
e03c677828
4 changed files with 8 additions and 9 deletions
|
@ -2647,8 +2647,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
|
||||
- (void) doNothing: (id) sender {}
|
||||
|
||||
- (NSToolbarItem *) toolbar: (NSToolbar *) t itemForItemIdentifier:
|
||||
(NSString *) ident willBeInsertedIntoToolbar: (BOOL) flag
|
||||
- (NSToolbarItem *) toolbar: (NSToolbar *) t itemForItemIdentifier: (NSString *) ident willBeInsertedIntoToolbar: (BOOL) flag
|
||||
{
|
||||
NSToolbarItem * item = [[NSToolbarItem alloc] initWithItemIdentifier: ident];
|
||||
|
||||
|
@ -2743,7 +2742,7 @@ void sleepCallBack(void * controller, io_service_t y, natural_t messageType, voi
|
|||
return nil;
|
||||
}
|
||||
|
||||
return item;
|
||||
return [item autorelease];
|
||||
}
|
||||
|
||||
- (NSArray *) toolbarAllowedItemIdentifiers: (NSToolbar *) t
|
||||
|
|
|
@ -792,13 +792,13 @@
|
|||
return [[peer objectForKey: @"Connected"] boolValue] ? fDotGreen : fDotRed;
|
||||
else if ([ident isEqualToString: @"Encryption"])
|
||||
{
|
||||
/*if ([[peer objectForKey: @"Encryption"] boolValue])
|
||||
if ([[peer objectForKey: @"Encryption"] boolValue])
|
||||
{
|
||||
if (!fLockImage)
|
||||
fLockImage = [NSImage imageNamed: @"Lock.tiff"];
|
||||
return fLockImage;
|
||||
}
|
||||
else*/
|
||||
else
|
||||
return nil;
|
||||
}
|
||||
else if ([ident isEqualToString: @"Client"])
|
||||
|
@ -863,8 +863,8 @@
|
|||
NSLocalizedString(@"Progress: %.1f%%", "Inspector -> Peers tab -> table row tooltip"),
|
||||
[[peer objectForKey: @"Progress"] floatValue] * 100.0]];
|
||||
|
||||
/*if ([[peer objectForKey: @"Encryption"] boolValue])
|
||||
[components addObject: NSLocalizedString(@"Encrypted Connection", "Inspector -> Peers tab -> table row tooltip")];*/
|
||||
if ([[peer objectForKey: @"Encryption"] boolValue])
|
||||
[components addObject: NSLocalizedString(@"Encrypted Connection", "Inspector -> Peers tab -> table row tooltip")];
|
||||
}
|
||||
|
||||
int port;
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
return item;
|
||||
return [item autorelease];
|
||||
}
|
||||
|
||||
- (NSArray *) toolbarSelectableItemIdentifiers: (NSToolbar *) toolbar
|
||||
|
|
|
@ -1039,7 +1039,7 @@ static int static_lastid = 0;
|
|||
if (peer->isUploading)
|
||||
[dic setObject: [NSNumber numberWithFloat: peer->downloadFromRate] forKey: @"DL From Rate"];
|
||||
|
||||
//[dic setObject: [NSNumber numberWithBool: peer->isEncrypted] forKey: @"Encryption"];
|
||||
[dic setObject: [NSNumber numberWithBool: /*peer->isEncrypted*/NO] forKey: @"Encryption"];
|
||||
|
||||
[dic setObject: [NSString stringWithCString: (char *) peer->client encoding: NSUTF8StringEncoding] forKey: @"Client"];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue