Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug] TabCounterToolbarButton never stops observing the SessionManager #2183

Closed
jonalmeida opened this issue Apr 30, 2019 · 0 comments
Closed
Labels
🐞 bug Crashes, Something isn't working, .. eng:health Improve code health Feature:Tabs

Comments

@jonalmeida
Copy link
Contributor

jonalmeida commented Apr 30, 2019

The TabCounterToolbarButton was copied from a-c but does not stop observing the SessionManager when the view is destroyed which may lead to memory leaking.

The fix would be to pass the view's parent so the observer can stop when the view is destroyed, or use the a-c component directly. 🙂

The code that leaks: https://github.com/mozilla-mobile/fenix/blob/master/app/src/main/java/org/mozilla/fenix/components/toolbar/TabCounterToolbarButton.kt#L27

The a-c implementation: https://github.com/mozilla-mobile/android-components/blob/master/components/feature/tabs/src/main/java/mozilla/components/feature/tabs/toolbar/TabCounterToolbarButton.kt#L28

┆Issue is synchronized with this Jira Task

@jonalmeida jonalmeida added the 🐞 bug Crashes, Something isn't working, .. label Apr 30, 2019
ekager added a commit to ekager/fenix that referenced this issue May 2, 2019
@data-sync-user data-sync-user changed the title [Bug] TabCounterToolbarButton never stops observing the SessionManager FNX2-17739 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager Aug 5, 2020
@data-sync-user data-sync-user changed the title FNX2-17739 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager FNX3-16125 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX3-16125 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager FNX-5503 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-5503 ⁃ [Bug] TabCounterToolbarButton never stops observing the SessionManager [Bug] TabCounterToolbarButton never stops observing the SessionManager May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. eng:health Improve code health Feature:Tabs
Projects
None yet
Development

No branches or pull requests

3 participants