Index: chrome/browser/ui/cocoa/history_overlay_controller.mm |
diff --git a/chrome/browser/ui/cocoa/history_overlay_controller.mm b/chrome/browser/ui/cocoa/history_overlay_controller.mm |
index 4cf44a07578f7784beb0bebcbfe1362e0351f8fb..35e972ac1009c110013077038bdb2cf89cc834a2 100644 |
--- a/chrome/browser/ui/cocoa/history_overlay_controller.mm |
+++ b/chrome/browser/ui/cocoa/history_overlay_controller.mm |
@@ -92,6 +92,11 @@ const CGFloat kGestureCompleteProgress = 0.3; |
return self; |
} |
+- (void)dealloc { |
+ [self.view removeFromSuperview]; |
+ [super dealloc]; |
+} |
+ |
- (void)loadView { |
const gfx::Image& image = |
ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( |
@@ -164,7 +169,9 @@ const CGFloat kGestureCompleteProgress = 0.3; |
} |
- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished { |
- [self.view removeFromSuperview]; |
+ // Destroy the CAAnimation and its strong reference to its delegate (this |
+ // class). |
+ [self.view setAnimations:nil]; |
} |
@end |