Skip to content

Conversation

@danesfeder
Copy link
Contributor

@devotaaabel and I were seeing a leak, I believe a regression resulting from #923.

NavigationViewModel was holding the instance of NavigationViewEventDispatcher on rotation.

@danesfeder danesfeder added bug Defect to be fixed. navigation-ui labels May 18, 2018
@danesfeder danesfeder added this to the 0.14.0 milestone May 18, 2018
@danesfeder danesfeder self-assigned this May 18, 2018
@Guardiola31337
Copy link
Contributor

@danesfeder @devotaaabel do you have the leak report by any chance? I'm curious how NavigationViewEventDispatcher could produce a leak if it's holding only callbacks 🤔

@Guardiola31337
Copy link
Contributor

Run into the same leak after launching NavigationActivity > press X button and then > back button to close the test app (no rotation involved) 👀

navigation_activity_leak

@danesfeder
Copy link
Contributor Author

NavigationEventDispatcher survives rotation with MapboxNavigation in the NavigationViewModel and we use the normal NavigationEventDispatcher to push events to NavigationViewEventDispatcher. So the old instance of NavigationViewEventDispatcher was getting event event updates, causing this leak.

Copy link
Contributor

@Guardiola31337 Guardiola31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danesfeder danesfeder merged commit 5f66e49 into master May 21, 2018
@danesfeder danesfeder deleted the dan-nav-leak branch May 21, 2018 14:24
@danesfeder danesfeder mentioned this pull request May 31, 2018
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Defect to be fixed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants