麻烦请问,这样写会导致内存泄露吗?多谢回复! for examle:
var Pro = {
doc : document,
getLeftArrowEvent : function(){
//引入this,即整个对象为方便以后可能的引用
var is = this,
doc = is.doc,
leftArrow = doc.getElementById('leftArrow');
leftArrow.onmouseover = function(){
var th = is,
doc = th.doc,
leftArrow = doc.getElementById('leftArrow');
leftArrow.style.cursor = 'pointer';
};
leftArrow.onmouseout = function(){
var th = is,
doc = th.doc,
leftArrow = doc.getElementById('leftArrow');
leftArrow.style.cursor = '';
};
leftArrow = null;
}
};