From 09fd974647ab5ff8aa088a356378f8c5cd9b88ff Mon Sep 17 00:00:00 2001 From: Evan Schoenberg Date: Thu, 4 Oct 2007 22:51:33 +0000 Subject: [PATCH] Merged [21218]: NSToolbarItem leaks its view, it appears. If we call setView: for a toolbar itme, be sure to do setView:nil when it is removed from the toolbar (as notified by NSToolbarDidRemoveItemNotification). Fixes #8042 which discussed the user icon toolbar button leaving the icon on screen after the window closed, which could only occur if it was never deallocated. git-svn-id: svn://svn.adiumx.com/adium/branches/adium-1.1@21219 1c916fce-81e2-0310-a464-8ca513f45935 --- Plugins/Secure Messaging/ESSecureMessagingPlugin.m | 1 + Source/BGEmoticonMenuPlugin.m | 1 + Source/ESUserIconHandlingPlugin.m | 1 + 3 files changed, 3 insertions(+) diff --git a/Plugins/Secure Messaging/ESSecureMessagingPlugin.m b/Plugins/Secure Messaging/ESSecureMessagingPlugin.m index c1c36cf75..34c3316a2 100644 --- a/Plugins/Secure Messaging/ESSecureMessagingPlugin.m +++ b/Plugins/Secure Messaging/ESSecureMessagingPlugin.m @@ -200,6 +200,7 @@ { NSToolbarItem *item = [[notification userInfo] objectForKey:@"item"]; if ([toolbarItems containsObject:item]) { + [item setView:nil]; [toolbarItems removeObject:item]; [validatedItems removeObject:item]; diff --git a/Source/BGEmoticonMenuPlugin.m b/Source/BGEmoticonMenuPlugin.m index 884612a43..8eefd82c3 100644 --- a/Source/BGEmoticonMenuPlugin.m +++ b/Source/BGEmoticonMenuPlugin.m @@ -141,6 +141,7 @@ { NSToolbarItem *item = [[notification userInfo] objectForKey:@"item"]; if ([[item itemIdentifier] isEqualToString:TOOLBAR_EMOTICON_IDENTIFIER]) { + [item setView:nil]; [toolbarItems removeObject:item]; } } diff --git a/Source/ESUserIconHandlingPlugin.m b/Source/ESUserIconHandlingPlugin.m index 28e07f659..34aa77e89 100644 --- a/Source/ESUserIconHandlingPlugin.m +++ b/Source/ESUserIconHandlingPlugin.m @@ -426,6 +426,7 @@ { NSToolbarItem *item = [[notification userInfo] objectForKey:@"item"]; if ([toolbarItems containsObject:item]) { + [item setView:nil]; [toolbarItems removeObject:item]; [validatedItems removeObject:item]; -- 2.11.4.GIT