How can I reclaim the memory used by widgets after they aren't on screen anymore? I've tried calling destroy(true) on the dialogs which does remove the DOM elements but the memory usage doesn't change.

The example BasicDialog eats up about 2MB which is fine, but I need that 2MB back after I hit the close button (code calls destroy() when the dialog is hidden) because one of the more complex windows will be created and destroyed a lot within the user's session and the memory never gets freed.

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<
html>
<
head>
<
title>Test</title>

<!--
PUT EXT YUI ADAPTER INCLUDES HERE -->

<
script type="text/javascript">
Ext.BLANK_IMAGE_URL '/ext-1.1-beta1/resources/images/default/s.gif';

function 
createDiv(parentElemid) {
    if(
typeof(parentElem) == 'undefined')
        
parentElem document.body;
    if(
typeof(id) == 'undefined')
        
id Ext.id();
    
    return 
Ext.DomHelper.append(parentElem, {tag"div"idid}, true);
};


TestApp = {};
TestApp.Application = function() {
    
this.searchWindow null;
    
this.caseWindows = [];
};
Ext.extend(TestApp.ApplicationExt.util.Observable, {
    
//private button handlers:
    
btnSearchCase: function(btn) {
        if(!
this.searchWindow)
            
this.searchWindow = new TestApp.SearchWindow({dialogTitle'test'});
        
        if(!
this.searchWindow.isVisible()) {
            
this.searchWindow.show();
        } else {
            
this.searchWindow.toFront();
        }
    },
    
    
btnSearchCase2: function(btn) {
        var 
tmp1 = new TestApp.SearchWindow();
        
tmp1.show();
        
        
this.caseWindows.push(tmp1);
    },
    
    
init: function() {
        var 
layout = new Ext.BorderLayout(document.body, {
            
north: {
                
initialSize84
            
},
            
center: {
                
splitfalse
            
}
        });
        
        var 
topCP = new Ext.ContentPanel({autoCreatetrue});
        var 
centerCP = new Ext.ContentPanel({autoCreatetrue});
        
centerCP.toolbar = new Ext.Toolbar(createDiv(centerCP.getEl()));
        
        var 
mnuCases = new Ext.menu.Menu();
        
mnuCases.add({text'Search Case (only 1 allowed on screen at once)'}).on('click'this.btnSearchCasethis);
        
mnuCases.add({text'Search Case (allows multiple windows)'}).on('click'this.btnSearchCase2this);

        var 
tb centerCP.getToolbar();
        
tb.add({
            
cls'x-btn-text',
            
text:'Test',
            
menumnuCases
        
});
        
        
layout.beginUpdate();
        
layout.add("north"topCP);
        
layout.add("center"centerCP);
        
layout.endUpdate();
        
        
Ext.DomHelper.applyStyles(topCP.getEl(), 'background-color: #eeeeec');
        
Ext.DomHelper.append(topCP.getEl(), {tag'img'src'imgs/logo-left.gif'});
    }
});


TestApp.SearchWindow = function(config) {
    
Ext.apply(thisconfig);
    
    if(!
this.width)
        
this.width 600;
    if(!
this.height)
        
this.height 400;
    if(!
this.minWidth)
        
this.minWidth 600;
    if(!
this.minHeight)
        
this.minHeight 400;
    if(!
this.dialogTitle)
        
this.dialogTitle 'Case Search';
    
    
this.dialog null;
    
    
TestApp.SearchWindow.superclass.constructor.call(this);
};

Ext.extend(TestApp.SearchWindowExt.util.Observable, {
    
isVisible: function() {
        if(!
this.dialog)
            return 
false;
        return 
this.dialog.isVisible();
    },
    
toFront: function() {
        if(!
this.dialog)
            return 
false;
        return 
this.dialog.toFront();
    },
    
show: function() {
        if(!
this.dialog) {
                
this.dialog = new Ext.BasicDialog(Ext.id(), {
                    
autoCreatetrue,
                    
titlethis.dialogTitle,
                    
collapsible:false,
                    
resizeHandles:'se',
                    
widththis.width,
                    
heightthis.height,
                    
minWidththis.minWidth,
                    
minHeightthis.minHeight,
                    
proxyDragtrue,
                    
center: {
                        
autoScroll:true,
                        
tabPosition'top',
                        
closeOnTabtrue,
                        
alwaysShowTabstrue
                    
}
                });
                
                var 
dlgTabs this.dialog.getTabs();
                var 
tabSearch dlgTabs.addTab(Ext.id(), 'Search Criteria'''false);
                
                
Ext.form.Field.prototype.msgTarget 'side';
                var 
frmSearch = new Ext.form.Form({
                    
labelWidth75// label settings here cascade unless overridden
                    
url:'save-form.php'});
                
                
frmSearch.add(
                    new 
Ext.form.TextField({
                        
fieldLabel'blah',
                        
name'blah',
                        
width:175
                    
}),
                    
                    new 
Ext.form.DateField({
                        
fieldLabel'blah2',
                        
name'blah2',
                        
width:175
                    
}));
                
                
frmSearch.addButton('Search', function(){
                    
Ext.MessageBox.alert('Status''TODO: Search.');
                });
                
                
tabSearch.bodyEl.setStyle('padding''10px');
                
frmSearch.render(tabSearch.bodyEl);
                
tabSearch.show();
                                
                
this.dialog.on('hide', function(dialog) { this.kill(); }, this);
            }
            
            
this.dialog.show();
    },
    
    
kill: function() {
        try {
            
this.dialog.destroy(true);
            
this.dialog null;
        }catch(
e) {
            
alert('Exception thrown! Message: ' e.message);
        }
    }
});

var 
myApp = new TestApp.Application();
Ext.EventManager.onDocumentReady(myApp.initmyApptrue);
</script>
</head>
<body>
</body>
</html> 
The above code could be a LOT shorter to explain this, but I wanted to leave the layout I'm using alone just incase it has any impact on the memory not getting freed.

Thanks!