JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"></div>
JavaScript
var handler = function() {},
data = '';
function testLeak() {
$('<div></div>')
.html(data)
.bind('foobar', handler)
.appendTo('#test')
.unbind('foobar')
.remove();
}
for (var i = 0; i < 100000; ++i) {
data += 'xxxxxxxxxx';
}
$(document).ready(function () {
setInterval(testLeak, 500);
});