最近,我遇到了我的一个应用程序,它消耗了太多的内存并增加了10 MB /秒.
因此,我想知道破坏JavaScript对象和变量的最佳方法,以便内存消耗保持不变,我的FF无法被破坏.
我在每8秒间隔调用两个JavaScript而不重新加载页面.
function refresh() {
$('#table_info').remove();
$('#table').hide();
if (refreshTimer) {
clearTimeout(refreshTimer);
refreshTimer = null ;
}
document.getElementById('refresh_topology').disabled=true;
$('<div id="preload_xml"></div>').html('<img src="pic/dataload.gif" alt="loading data" /><h3>Loading Data...</h3>').prependTo($("#td_123"));
$("#topo").hide();
$('#root').remove();
show_topology();
}
Run Code Online (Sandbox Code Playgroud)
如何查看哪个变量导致内存开销和方法停止执行该进程?