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

Unified Diff: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm

Issue 2252523002: [Merge to 2785] Fix many memory leaks in chrome/browser/ui/cocoa/omnibox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 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
Index: chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
diff --git a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
index 5098dc026bec635c6cc00cc4021dcb1cc58a2d66..b8065492c703c51f741a2f626f3a07d3f9835713 100644
--- a/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
+++ b/chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.mm
@@ -11,6 +11,7 @@
#include "base/i18n/rtl.h"
#include "base/mac/foundation_util.h"
+#include "base/mac/objc_property_releaser.h"
#include "base/mac/scoped_nsobject.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
@@ -395,6 +396,11 @@ NSAttributedString* CreateClassifiedAttributedString(
} // namespace
+@interface OmniboxPopupCellData () {
+ base::mac::ObjCPropertyReleaser propertyReleaser_OmniboxPopupCellData_;
+}
+@end
+
@interface OmniboxPopupCell ()
- (CGFloat)drawMatchPart:(NSAttributedString*)attributedString
withFrame:(NSRect)cellFrame
@@ -465,15 +471,12 @@ NSAttributedString* CreateClassifiedAttributedString(
}
max_lines_ = 1;
}
+ propertyReleaser_OmniboxPopupCellData_.Init(self,
+ [OmniboxPopupCellData class]);
}
return self;
}
-- (void)dealloc {
- [incognitoImage_ release];
- [super dealloc];
-}
-
- (instancetype)copyWithZone:(NSZone*)zone {
return [self retain];
}
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_popup_cell.h ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_popup_matrix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698