Fix memory leak in ToolbarProgressBar
This is a follow-up to https://chromium-review.googlesource.com/c/chromium/src/+/1172425 Another memory leak was found in ToolbarProgressBar. It happens due because animations are not cleaned up when activity is destroyed. The references to animation listeners get stuck in android.animation.AnimationHandler, which is a singleton. From the animation listeners the chain of references leads all the way up to ChromeTabbedActivity instances. So this leak happens when user closes Chrome while the page is loading, and then the system kills the activity. It's easily reproducible with "Don't keep activities" option. Bug: 872661 Change-Id: I6eebc11a575d45c899f37be5ca7a6862923f0ee5 Reviewed-on: https://chromium-review.googlesource.com/1175795Reviewed-by:Matthew Jones <mdjones@chromium.org> Commit-Queue: Pavel Shmakov <pshmakov@chromium.org> Cr-Commit-Position: refs/heads/master@{#583320}
Showing
Please register or sign in to comment