avoid memory leak in jQuery.cache
This commit is contained in:
parent
b11dd36c7a
commit
ac1a4ef961
1 changed files with 2 additions and 0 deletions
|
@ -710,6 +710,7 @@
|
||||||
Ox.Focus.removeElement(this.oxid);
|
Ox.Focus.removeElement(this.oxid);
|
||||||
this.self(_).unbindKeyboard();
|
this.self(_).unbindKeyboard();
|
||||||
this.$tooltip && this.$tooltip.remove();
|
this.$tooltip && this.$tooltip.remove();
|
||||||
|
jQuery.cleanData(this.$element);
|
||||||
delete Ox.$elements[this.oxid];
|
delete Ox.$elements[this.oxid];
|
||||||
// If setElement($element) was used, delete $element too
|
// If setElement($element) was used, delete $element too
|
||||||
delete Ox.$elements[this.$element.oxid];
|
delete Ox.$elements[this.$element.oxid];
|
||||||
|
@ -738,6 +739,7 @@
|
||||||
this.findElements().forEach(function($element) {
|
this.findElements().forEach(function($element) {
|
||||||
$element.removeElement(false);
|
$element.removeElement(false);
|
||||||
});
|
});
|
||||||
|
jQuery.cleanData(this.$element);
|
||||||
this.$element.replaceWith($element);
|
this.$element.replaceWith($element);
|
||||||
if ($element.$element) { // $element is Ox.Element
|
if ($element.$element) { // $element is Ox.Element
|
||||||
this.$element = $element.$element;
|
this.$element = $element.$element;
|
||||||
|
|
Loading…
Reference in a new issue