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

Memory leak #227

Open
leolux opened this issue Dec 6, 2017 · 2 comments
Open

Memory leak #227

leolux opened this issue Dec 6, 2017 · 2 comments

Comments

@leolux
Copy link

leolux commented Dec 6, 2017

I opened and closed the first dialog several times on the page http://dwmkerr.github.io/angular-modal-service/.

This producdes the following memory leak:
memoery-leak-2-in-angular-modal-service

@dwmkerr
Copy link
Owner

dwmkerr commented Dec 7, 2017

Thank for sharing @leolux! I've done of this kind of analysis (http://www.dwmkerr.com/fixing-memory-leaks-in-angularjs-applications) so hopefully when I get some quiet time I can take a look at this...

@trajkovikj
Copy link

I am not sure, but I think that this bug comes from the usage of factory instead of service. Using a factory, angular creates objects every time the factory is injected, while using the service method, angular creates only one instance from that service (singleton). Another issue that may raise using the factory method is tracking of all open modals...
Btw I like your service very much (especially its simplicity) and I would very much like to see components of angular 1.5 integrated in it (like in ui-bootstrap modal service).

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

No branches or pull requests

3 participants