Side navigation
#8592 closed bug (wontfix)
Opened March 22, 2011 06:16PM UTC
Closed March 24, 2011 03:12PM UTC
Memory Leak caused by empty and append in Chrome 10
Reported by: | thatismatt@gmail.com | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.next |
Component: | unfiled | Version: | 1.5.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Using empty to remove nodes added by append appears to leak NodeLists, HTMLDivElements and DocumentFragments in Chrome 10.
Minimal code to reproduce here:
The uses of append without remove, and remove without append do not leak. ie the bug is caused by some interaction between this two functions.
For the simple case of appending one node I faked out buildFragment and the leak went away. So this pointed to the issue being in buildFragment.
I'm using:
Chrome 10.0.648.151
Windows 7
jQuery 1.5.1 unminified
This is an issue in Chrome. The following code leaks:
document.createElement('div').getElementsByTagName('div');
See http://jsbin.com/ufabo6 for an example that will crash a Chrome process in about a minutes time.
Line 5634 of jQuery 1.5.1 has the leaking call to
getElementsByTagName
that lead me to find this.I have verified this on Chrome 11 and 10 on windows 7 and Chrome 10 on Mac OS 10.5.