如何释放资源?

  以下代码在IE中会不断吃掉内存,怎么解决?
  var idGetMsg=0;
  function UpdateMessage()
  {
   if(idGetMsg)
   {
    clearTimeout(idGetMsg);
    idGetMsg=0;
   }
   var xh = new ActiveXObject("Microsoft.XMLHTTP");
   xh = null;
   idGetMsg=setTimeout(UpdateMessage,1);
  }
原文地址:https://www.cnblogs.com/huqingyu/p/31909.html