fix leaking of dl manager toolbar buttons b=283431, no review as this is obvious

This commit is contained in:
joshmoz%gmail.com 2005-02-25 03:34:39 +00:00
Родитель 2a00a68055
Коммит b73e059786
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -618,7 +618,7 @@ static id gSharedProgressController = nil;
-(NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag -(NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
{ {
NSToolbarItem *theItem = [[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier]; NSToolbarItem *theItem = [[[NSToolbarItem alloc] initWithItemIdentifier:itemIdentifier] autorelease];
[theItem setTarget:self]; [theItem setTarget:self];
[theItem setEnabled:NO]; [theItem setEnabled:NO];
if ([itemIdentifier isEqualToString:@"removebutton"]) { if ([itemIdentifier isEqualToString:@"removebutton"]) {