JavaScript memory leaks - test

Intro

Explanation

Leaks.

var x;

function init()
{
	createLinks();
	x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i+=2)
	{
		treatOneLink(i);
	}
}

function treatOneLink(i)
{
	if (!x[i].nextSibling) return;
	x[i].relatedElement = x[i].nextSibling;
	x[i].nextSibling.relatedElement = x[i];
}

Test