after a ajax requst can you then free the memory by doing this?
function Ajax(){
this.url = null;
this.data = null;
this.success = null;
this.global = true;
this.timeout = JSON_TIMEOUT;
this.cache = false;
this.dataType = 'json';
this.type = 'post';
var _this = this;
this.send = function(){
var jqxhr = $.ajax({
url : this.url,
data : this.data,
timeout : this.timeout,
cache : this.cache,
dataType : this.dataType,
type : this.type,
global : this.global
}
)
.success(this.success)
.error(function(){
Dialog.set_error({
headline : Lang.get('HDL_ERROR'),
body : Lang.get('ERR_TIMEOUT'),
btns : [
{
value : Lang.get('BTN_OK'),
script : function(){},
focus : true
}
]
})
})
.complete(function(){
delete _this;
});
};
}