Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm

Issue 174480: OSX: Remove some nsnotificationcenter observers more reliably. (Closed)
Patch Set: Egregious whitespace change. Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/keystone_glue.m ('k') | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
index 69a1b4ee32dd4578503bcc95eef4d7763fa2c325..de894c677bd87090cf1219c08fc9487c2d40654b 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_mac.mm
@@ -184,9 +184,6 @@ AutocompleteEditViewMac::~AutocompleteEditViewMac() {
// Disconnect field_ from edit_helper_ so that we don't get calls
// after destruction.
[field_ setDelegate:nil];
-
- // Disconnect notifications so they don't signal a dead object.
- [[NSNotificationCenter defaultCenter] removeObserver:edit_helper_];
}
void AutocompleteEditViewMac::SaveStateToTab(TabContents* tab) {
@@ -717,6 +714,11 @@ std::wstring AutocompleteEditViewMac::GetClipboardText(Clipboard* clipboard) {
return self;
}
+- (void)dealloc {
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [super dealloc];
+}
+
- (BOOL)control:(NSControl*)control
textView:(NSTextView*)textView doCommandBySelector:(SEL)cmd {
// Don't intercept up/down-arrow if the popup isn't open.
« no previous file with comments | « chrome/app/keystone_glue.m ('k') | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698