Prevent IE leaks #69

Merged
merged 2 commits into from Sep 27, 2012

Conversation

Projects
None yet
2 participants
Contributor

victor-homyakov commented Sep 24, 2012

Without fix:

 - when ELEMENT_CACHE is not empty (e.g. SPAN was created with new Element('span')), IE will leak memory for DIV and ELEMENT_CACHE after page unload.
 - when ELEMENT_CACHE is empty, DIV is cleaned correctly without any additional actions.

Problem detected and fix tested in sIEve-0.0.8.

victor-homyakov added some commits Sep 24, 2012

Prevent IE leaks
Without fix:

 - when `ELEMENT_CACHE` is not empty (e.g. `SPAN` was created with `new Element('span'))`, IE will leak memory for `DIV` and `ELEMENT_CACHE` after page unload.
 - when `ELEMENT_CACHE` is empty, `DIV` is cleaned correctly without any additional actions.

Problem detected and fix tested in sIEve-0.0.8.
Collaborator

savetheclocktower commented Sep 27, 2012

Ugh. I'm going to get rid of the element creation cache in 1.8; it's done far more harm than good. The only thing it had going for it was that cloning from the cache was more performant than creating an element from scratch, and in modern browsers that's not even true anymore.

savetheclocktower added a commit that referenced this pull request Sep 27, 2012

Merge pull request #69 from victor-homyakov/patch-22
Clear element creation cache in IE on page unload.

@savetheclocktower savetheclocktower merged commit fccc5c3 into sstephenson:master Sep 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment