It appears that code like this:
document.getElementById("idImgSpan").style.backgroundImage = "url(dog.ico)";
leaks memory. Whereas, code like this:
document.getElementById("idImg").src = "dog.ico";
does not. This is for IE 6, XP SP2, a demonstration is here: IE Leak Demo (download of zip file, unpack locally). Open task manager, Processes tab, ensure the VM Size column is displayed and watch the VM size stay rock steady when the <img> element is used but climb when style background image is used. Perhaps this is already well known or I have done something daft.