-
Notifications
You must be signed in to change notification settings - Fork 649
Memory leaks while changing form many times #200
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
Comments
This looks serious, I'll escalate this to @davidlgj , and see if we can come to the same conclusion and any possible solutions. |
hi @burdiuz, and thank you for reporting this. Ugh, not nice at all. So the problem is/was that we use I did a fix where I create a new scope and destroy that on redraw, this fixes my testcase that reproduces the error, but if you have time to test it and verify that it also works for you that would be awesome. It's pushed to the development branch, so just checkout the latest there. (this is the commit with the fix if you're interested 60c9b72) |
I am using the library in a similar case. Thanks! |
@pflorian91 thanks! Nice write up :-) So I can confirm that my fix, that is in the develop branch now, solves this as well. Will be in next release, hopefully tomorrow. |
I was investigating issue
#198
and found that removed form element scopes and controllers continue to live and they listen to events and can break form validation. I've tested this and found that amount of living form element scopes living is proportional to form changes count.
So I've tried to $destroy() scopes of form elements before replacing them with new ones and it fixed both issues this and issue with validation(#198). I guess it would be nice to have ability at least manually destroy them via schema-form API.
Here are part of code resolving the issue
The text was updated successfully, but these errors were encountered: