IE innerHTML Memory Leak Demo (the fix)

Upon clicking the "Start Leak" button, a script will execute repeatedly which creates a new <div> element in memory and then adds that element to the page. Only after the element has been added to the page, do we set its .innerHTML to a string to 2000 <a> tags with onclick events wired up ('<a onclick = "test()">Test Link</a>').

Letting this script run for about 60 seconds, and using Perfmon to monitor memory consumption, you should notice that, unlike the Leak Page, memory consumption remains relatively constant.