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
Cleanup event handling #451
Comments
Yes, I agree the google Marker then has a stale reference to the SebM Marker |
@alexweber ya, this is a point that is on my TODO list for a while now. We should address this in the next release. I will think about this a little further and will comment above when I have found a good way for handling this in the future. Thanks guys! |
I've addressed item 2 in the commit above, still unclear as to whether we need to use |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @SebastianM @brian-singer, Please correct me if I'm wrong but it looks like we could tighten up event handling in a few places:
google.maps.event.clearInstanceListeners(marker);
in the marker manager: https://github.com/SebastianM/angular2-google-maps/blob/master/src/core/services/managers/marker-manager.ts#L25_addEventListeners
but don't explicitly un-subscribe to them on destroy: https://github.com/SebastianM/angular2-google-maps/blob/master/src/core/directives/google-map-marker.ts#L125 similar to what we do here: https://github.com/SebastianM/angular2-google-maps/blob/master/src/core/directives/google-map.ts#L224There might be others too but these are the ones that come to my attention right away, what are your thoughts? Happy to address in a PR if you want. Thanks!
The text was updated successfully, but these errors were encountered: