我的情况是我必须克隆一个元素,读取它的属性和其他解析功能,但是现在因为我不这样做,element.parentNode.appendChild(clonedElement)
如何从内存中删除这个克隆?
var clonedElement = element.cloneNode();
// do some stuff with it
clonedElement = null; // is this good enough?
所以,是的,clonedElement = null;
足以从记忆中清除它吗?