显然这是不可能的
function node(){
this.value="hello";
var self = this;
this.remove=function(){
delete(self); //no found
//or
self=null; //no found
}
}
var test = new node();
test.remove(); //no found
这只删除指针,这不会删除指向的对象
var test = new node();
var aux = test;
delete aux;
这只删除指针,这不会删除指向的对象
var test = new node();
var aux = test;
aux=null;