使用jquery UI tabs的样例(http://jqueryui.com/tabs/#manipulation),
新添加的tab然后关闭,内存一直不释放,持续增长。只有把IE关闭了,内存才释放。求每次tab关闭时,内存释放的方法。调用CollectGarbage()方法也没用。
求解决方法。
jquerytabs内存

解决方案 »

  1.   

    试着删除tab之前,解绑所有与此tab的DOM相关的事件,将所以对此tab的DOM的引用置为null
      

  2.   


    按照URL上的源代码,如何修改对应呢?
      

  3.   

     $(function() {
    var tabTitle = $( "#tab_title" ),
    tabContent = $( "#tab_content" ),
    tabTemplate = "<li><a href='#{href}'>#{label}</a> <span class='ui-icon ui-icon-close' role='presentation'>Remove Tab</span></li>",
    tabCounter = 2;
    var tabs = $( "#tabs" ).tabs();
    // modal dialog init: custom buttons and a "close" callback reseting the form inside
    var dialog = $( "#dialog" ).dialog({
    autoOpen: false,
    modal: true,
    buttons: {
    Add: function() {
    addTab();
    $( this ).dialog( "close" );
    },
    Cancel: function() {
    $( this ).dialog( "close" );
    $( this ).unblind('click');
    }
      

  4.   


    $( this ).unblind('click'); 报错,并且也无效。