Fix some missed free() calls

This commit is contained in:
nathangray 2020-03-16 14:15:38 -06:00
parent 81266c0eba
commit 5af17679f3
7 changed files with 35 additions and 29 deletions

View File

@ -71,13 +71,19 @@ declare var et2_nextmatch_header_bar : any;
declare var et2_nextmatch_header : any; declare var et2_nextmatch_header : any;
declare var et2_nextmatch_customfields : any; declare var et2_nextmatch_customfields : any;
declare var et2_nextmatch_controller : any; declare var et2_nextmatch_controller : any;
declare class et2_dynheight { declare class et2_dynheight
{
constructor(_outerNode, _innerNode, _minHeight); constructor(_outerNode, _innerNode, _minHeight);
outerNode : any;
update : any; outerNode: any;
free : any; update: any;
destroy();
}
declare class et2_nextmatch_rowProvider
{
} }
declare class et2_nextmatch_rowProvider {}
declare var et2_nextmatch_rowWidget : any; declare var et2_nextmatch_rowWidget : any;
declare var et2_nextmatch_rowTemplateWidget : any; declare var et2_nextmatch_rowTemplateWidget : any;
declare var et2_ajaxSelect : any; declare var et2_ajaxSelect : any;

View File

@ -70,7 +70,7 @@ var et2_split = /** @class */ (function (_super) {
// Destroy splitter, restore children // Destroy splitter, restore children
this.div.trigger("destroy"); this.div.trigger("destroy");
// Destroy dynamic full-height // Destroy dynamic full-height
this.dynheight.free(); this.dynheight.destroy();
_super.prototype.destroy.call(this); _super.prototype.destroy.call(this);
// Remove placeholder children // Remove placeholder children
if (this._children.length == 0) { if (this._children.length == 0) {

View File

@ -17,7 +17,7 @@ jquery.splitter;
*/ */
import {et2_DOMWidget} from "./et2_core_DOMWidget"; import {et2_DOMWidget} from "./et2_core_DOMWidget";
import {WidgetConfig, et2_register_widget} from "./et2_core_widget"; import {et2_register_widget, WidgetConfig} from "./et2_core_widget";
import {ClassWithAttributes} from "./et2_core_inheritance"; import {ClassWithAttributes} from "./et2_core_inheritance";
/** /**
@ -109,7 +109,7 @@ class et2_split extends et2_DOMWidget implements et2_IResizeable, et2_IPrint
this.div.trigger("destroy"); this.div.trigger("destroy");
// Destroy dynamic full-height // Destroy dynamic full-height
this.dynheight.free(); this.dynheight.destroy();
super.destroy(); super.destroy();

View File

@ -855,7 +855,7 @@ var et2_vfsUpload = /** @class */ (function (_super) {
while (this._children.length > 0) { while (this._children.length > 0) {
var node = this._children[this._children.length - 1]; var node = this._children[this._children.length - 1];
this.removeChild(node); this.removeChild(node);
node.free(); node.destroy();
} }
this.progress.empty(); this.progress.empty();
this.list.empty(); this.list.empty();
@ -919,7 +919,7 @@ var et2_vfsUpload = /** @class */ (function (_super) {
var child = this._children[child_index]; var child = this._children[child_index];
if (child.options.value.path === file_data.path) { if (child.options.value.path === file_data.path) {
this.removeChild(child); this.removeChild(child);
child.free(); child.destroy();
} }
} }
} }

View File

@ -976,9 +976,9 @@ class et2_vfsUpload extends et2_file
// Remove previous // Remove previous
while(this._children.length > 0) while(this._children.length > 0)
{ {
var node = this._children[this._children.length-1]; var node = this._children[this._children.length - 1];
this.removeChild(node); this.removeChild(node);
node.free(); node.destroy();
} }
this.progress.empty(); this.progress.empty();
this.list.empty(); this.list.empty();
@ -1058,7 +1058,7 @@ class et2_vfsUpload extends et2_file
if(child.options.value.path === file_data.path) if(child.options.value.path === file_data.path)
{ {
this.removeChild(child); this.removeChild(child);
child.free(); child.destroy();
} }
} }
} }

View File

@ -136,7 +136,7 @@ widget_browser.prototype.select_widget = function(e,f)
if(this.widget) if(this.widget)
{ {
this.et2.widgetContainer.removeChild(this.widget); this.et2.widgetContainer.removeChild(this.widget);
this.widget.free(); this.widget.destroy();
this.widget = null; this.widget = null;
} }