Closed MatthieuBarthel closed 10 years ago
I have just commit another small fix regarding streetView.
You can reproduce the bug on this fiddle: http://jsfiddle.net/a4Wug/1/
I can't reproduce the bug on the example page: http://dylanfprice.github.io/angular-gm/1.0.0/examples/#!/map/ However it happens between different controllers in one of our web application (where angular-gm is used intensively ;)
Thank you.
Awesome thanks for the PR! If you could fix the failing test and maybe add one for your use case (i.e. make sure once listeners are removed when the map controller is destroyed) I'll merge it in.
Cool, thanks to you for all the hard work on this awesome module.
I fixed the failing test and added two for my use case. I never used Karma before, it's really nice.
Don't hesitate if there is anything else I can do.
Hi, I'm Kevin's colleague (the author of the issue #45).
It looks like "once" events listeners don't always get triggered, adding them to the listeners array clearly fix a memory leak as you can see below (done with the Chrome inspector timeline).
Without the fix![pastedgraphic-4](https://f.cloud.github.com/assets/435534/2088610/12c9cfd6-8e7d-11e3-857f-d0e51f260c8c.png)
With the fix![pastedgraphic-5](https://f.cloud.github.com/assets/435534/2088618/19b45f46-8e7d-11e3-9bf0-92e8f2d51d7d.png)
I can create a plunker example if you want to experiment the issue by yourself.