angular/angular.js — pull request #7913 by jbedard (2014-06-20 07:43:21+00:00)
Title: nested transclusion memory leak

When the transclude function creates the scope it destroys that scope on the '$destroy' jQuery event. If that element is a comment (because it was also transcluded, for example) then:
* jqLite adds and leaks data on the comment node, but $destroy seems to get called (the added test shows this)
* jQuery does not add/leak data on the comment node, so $destroy does not get called (the modified test shows this)

Here's another example: http://run.plnkr.co/ePCDME3nD8FMsUx9/