-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Calling map remove method does not remove FullscreenControl event listener #7036
Comments
I think this memory leak is only relevant to the A workaround for this issue pending a more permanent fix is to keep a reference to the control and call |
This sounds like the right fix to me. In fact, the map should call |
Yeah for now I am calling |
Oh, I think I misread @mollymerp's suggestion. She was suggesting an end-user workaround. I agree @stephengsumo, |
closed by #7042 |
Calling map.remove() does not remove Controls from the map. I'm using the FullScreen control and each time a new map is created, it adds a document event listener onfullscreenchange. This listener has a reference to the map and so memory is being leaked.
mapbox-gl-js version: 0.47.0
browser: Chrome Version 67.0.3396.99
Steps to Trigger Behavior
Go to https://jsfiddle.net/pmxgoqh3/8/
Link to Demonstration
https://jsfiddle.net/pmxgoqh3/8/
Expected Behavior
Calling map.remove() should remove Controls from the map.
Actual Behavior
Calling map.remove() does not remove Controls from the map.
The text was updated successfully, but these errors were encountered: