Closed
Description
Originally reported by flexphperia at: http://bugs.jquery.com/ticket/15235
I have found memory leak in reliableMarginRight function.
Memory leak is created when you call $element.css('marginRight')
JsFiddle: http://fiddle.jshell.net/z3jo9k1q/show/light/
Test case:
- open above address in Chrome,
- open developer tools, make Heap snapshot,
- click on button in jsfiddle example, red element will be removed
- make another heap snapshot with browser tools
- compare snapshots, you will find one HtmlDivElement that is detached from DOM but keeping reference in reliableMarginRight function
Fix: Adding this, after 5665 line in jQuery uncompressed code will fix the problem:
docElem.removeChild( container ); div.removeChild( marginDiv ); //this is new line
Issue reported for jQuery 2.1.1