I've noticed a leak of DOM nodes and attached listeners with zepto. Here's a simple case:
<div id="top"></div>
function doWork() {
$('#top').html('<div title="test element" id="inner">testing</div>');
$('#inner').click(cb);
timeout = setTimeout(doWork, 1);
}
function cb() { console.log('callback'); }
doWork();
When capturing Timeline after running several minutes with Zepto I see the following:
Nodes are not collected by GC, references to them are somewhere inside Zepto, JS heap is increasing.
If I replace Zepto with jQuery:
With jQuery, listeners count is stable, nodes count is increasing during the capture but returns back to small amount after restrating the timeline, as expected, JS heap doesn't grow: this timeline was captured after several minutes, and you can compare the numbers with Zepto.
I've noticed a leak of DOM nodes and attached listeners with zepto. Here's a simple case:
When capturing Timeline after running several minutes with Zepto I see the following: Nodes are not collected by GC, references to them are somewhere inside Zepto, JS heap is increasing.
If I replace Zepto with jQuery: With jQuery, listeners count is stable, nodes count is increasing during the capture but returns back to small amount after restrating the timeline, as expected, JS heap doesn't grow: this timeline was captured after several minutes, and you can compare the numbers with Zepto.
Zepto 1.1.6, jQuery 2.2.0, Chrome 48 (Mac OS X)