Datepicker memory leaks and detached DOM elements
Plunkr: http://plnkr.co/edit/GJtRokCxZADkRgNwVtGY?p=preview Related? https://github.com/angular-ui/bootstrap/issues/2363
Datepicker appears to leak memory when changing routes and does not clean itself up completely when in a view where a datepicker is no longer used.
How to reproduce: Switch to route 2 Switch back to route 1 Switch to route 2 Switch back to route 1
Note that there is 1 tree of detached DOM elements related to the datepicker (using Chrome profiler).

Switch to route 2 Switch back to route 1 Switch to route 2 Switch back to route 1 Switch to route 2 Switch back to route 1 Switch to route 2 Switch back to route 1
Now there are several trees of detached DOM elements related to the datepicker.

If it was just the datepicker being retained in memory this would not be as big of a deal, but this leak causes any view that contains a datepicker to also be retained in memory. For larger views, memory usage gets out of hand very quickly,
+1
+1
+1
+1
+1
I wonder why there is no any warning about causing memory leak. User expects smooth UX, but gets memory leak with crashing browser.
Tabset also produces memory leak. Same as datepicker's scenario to reproduce memory leak.
+1
I just attempted to reproduce this. I'm not seeing memory leaks.
The detached DOM is there only because the garbage collection (GC) hasn't run.
Using the record heap allocations option, I saw that the DOM was being cleaned up:

The last blue bar there shows the detached DOM that hasn't been cleaned up, but the previous gray bars were all cleaned up (hence they turn gray).
There maybe a leak but this Plunker doesn't demonstrate it. Also, please make sure you're not recording the memory profile of the Plunker app, open the embed in a new window.
Here's what I saw on the Timeline view (this doesn't correspond with the heap allocation run above, it was a separate occasion but I clicked on route 2/route 1 repeatedly as well). The last dip was when I forced GC to run (there's a button on the timeline view).

It was with this plunk (running locally, not in the iframe) that I could reproduce this 100% of the time following my listed steps. I could get into the 100s of MBs if I clicked enough times.
I can no longer reproduce it today. Perhaps something within Chrome has changed between the time that I reported this and now. Consider it addressed unless someone else runs into the same issue.
Just checked my chrome version on mac (latest version).
Created simplest project with 3 tabs and empty controllers, one tab contains 17 datepicker elements.
Click on tab with datepickers then to empty tab and again for 2-3 times.
After that force GC using timeline record and press bin icon and after garbage collection take heap profile and see results of such operation
and i've disabled angular batarang (if someone suspects it)
I see a huge memory leak when using angular bootstrap datepickerPopup, on inspecting the heap snapshots, I can see "scope.close" function of the "datepickerPopup" directive associated with detached DOM elements. In addition to this, the $parent property of the directive somehow has the entire scope object of the page on which I have used datepickerPopup. This leaked parent scope because of datepicker directive is causing huge memory leaks in my app. :(
Please open another issue if you want to demonstrate this. I need a plunker to investigate the issue.
opened an issue #2658 with a plunker to repro the leak. I saw that leak only exists when jQuery is also included in the app.