-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker leaks memory when used in presence of jquery #2658
Comments
+1 |
1 similar comment
+1 |
Thanks for posting this. I've done some investigation to this. It looks like an AngularJS bug with jQuery's cache. It's jQuery's caching that's keeping the references to the scopes. The newest AngularJs version seems to have fixed most of the leaking. Your Plunker (Angular 1.2.10): Notice there are differences in the y-axis scaling, but look at the "Selected Size" value. Here's the Plunker I used: |
+1 |
1 similar comment
+1 |
I have made the fix in the code for this issue. Its a very small fix, datepickerPopup directive creates a popupElement div in the code which needed to be removed. I have created plunkers for comparison. Plunk without fix:- Plunk after fix:- I would like to contribute the change back to the library. @chrisirhc can you help me on how to submit a PR? |
Created a pull request for the fix |
When datepicker is used in an application which has jQuery included as well, then datepicker is seen to leak memory.
The scope of the controller on which datepicker is used is seen to leak when an investigation of heap is done.
I have created a plunker to show this issue.
http://embed.plnkr.co/qRZEMgBRNIBRjE1fTcCM/
On repeatedly opening and closing a page with datepicker on it, leaks memory which is never reclaimed on GC cycle.
The text was updated successfully, but these errors were encountered: