According to  MSDN:JScript   delete Operator
Deletes a property from an object, or removes an element from an array.delete expression
The expression argument is a valid JScript expression that usually results in a property name or array element. Res
If the result of expression is an object, the property specified in expression exists, and the object will not allow it to be deleted, false is returned.In all other cases, true is returned.---------------------
Array is an object

解决方案 »

  1.   

    delete方法只能删除一个对象的属性或一个数组的元素,而不能直接删除一个对象或一个变量
      

  2.   

    我删除数组的目的就是为了要释放一些资源,因为我可能要不停地new一些数组。
    照您这样说,难道说彻底释放数组占用的资源就只能一个一个元素地删除吗?
      

  3.   

    如果你不想不停的new一些数组,可以用splice方法增加新的元素,去掉旧的元素
    要不然就只有循环删除了
      

  4.   

    P = null;
    GarbageCollect();