Skip to main content

Bug Tracker

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:

http://jsbin.com/ipude4

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

Attachments (0)
Change History (2)

Changed March 24, 2011 09:11AM UTC by thatismatt comment:1

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.

Changed March 24, 2011 03:12PM UTC by dmethvin comment:2

resolution: → wontfix
status: newclosed

It sounds like you should file it as a Chrome bug.