Delete object from memory in javascript

I am working on an AJAX application with a lot of Javascript. All pages are loaded through AJAX.
On a certain page I have a grid which is build in Javascript. Now when I leave that page I want to destroy that grid. I call jQuery.remove() but this only deletes the object from the DOM.
My question is how can I delete this grid object from the memory? Cause it still exists when I move away from the page.

Much appreciated!


如果删除对网格的所有引用(即将空值赋予变量),则垃圾回收器将从内存中删除该对象。


put the grid into a div or anything you want. when you want to delete it use

$("<the name of the div>").empty();

that will clear it.

链接地址: http://www.djcxy.com/p/27188.html

上一篇: 与同一商店的网格存在问题Ext JS

下一篇: 在javascript中从内存中删除对象