Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #595 TileLayer not getting disposed correctly #596

Merged
merged 2 commits into from
Jul 8, 2020

Conversation

kuhnroyal
Copy link
Contributor

Correctly dispose TileLayer and Tiles in the order required by the TickerProviderStateMixin. The AnimationController in the tiles was not being disposed at all. After this change _pruneTiles sometimes gets called after the widget is already disposed - added a mounted check to prevent this.

Copy link
Contributor

@maRci002 maRci002 left a comment

Choose a reason for hiding this comment

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

This is the proper way to dispose AnimationController.

@kuhnroyal
Copy link
Contributor Author

Would be nice to get this into a new release. 0.9.0 is unusable for me.

@maRci002
Copy link
Contributor

maRci002 commented May 7, 2020

You can still use your fix as dependency until new release:

  flutter_map:
    git:
      url: git://github.com/johnpryan/flutter_map.git
      ref: a00355b13951605e88e6a16152f18852886a387e

Or:

  flutter_map:
    git:
      url: git://github.com/kuhnroyal/flutter_map
      ref: fix-tilelayer-dipose

@kuhnroyal
Copy link
Contributor Author

I know ;)

Correctly dispose TileLayer and Tiles in the order required by the TickerProviderStateMixin. The AnimationController in the tiles was not being disposed at all. After this change `_pruneTiles` sometimes gets called after the widget is already disposed - added a mounted check to prevent this.
johnpryan added a commit that referenced this pull request Jul 8, 2020
@johnpryan johnpryan merged commit 9d64fac into fleaflet:master Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants