summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/form_relational_widgets.js
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2016-09-01 15:26:41 +0200
committerGéry Debongnie <ged@odoo.com>2016-11-04 14:07:35 +0100
commita8e79e960aa962b4b89710918a03a5983bf492c6 (patch)
tree92d5dcc5685adf5c49c64d7b8e2d1d644470409c /addons/web/static/src/js/views/form_relational_widgets.js
parent3cb337945628ffc243072c93a47f6fc55d0f03fd (diff)
[FIX] bus,im_odoo_support, web*: fix various memory leaks
* Tip are never destroyed when change view mode * unbind methods * mail: memory leak with unbind methods * web: memory leak because 'ui-autocomplete' is never destroyed * web_editor: memory leak for wrong unbind on destroy * web: memory leak: must remove fileupload handler * bus: memory leak: correctly debind handlers on window in bus.Bus * remove handlers on switch buttons and views $buttons * remove handlers on breadcrumbs * web: memory leak: correctly debind handlers * im_odoo_support: memory leak: remove fileupload handler odoo_support Note: part of this commit was actually authored by aab
Diffstat (limited to 'addons/web/static/src/js/views/form_relational_widgets.js')
-rw-r--r--addons/web/static/src/js/views/form_relational_widgets.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index be926614bda..61ffc70631a 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -101,6 +101,9 @@ var FieldMany2One = common.AbstractField.extend(common.CompletionFieldMixin, com
delete this.$dropdown;
}
if (this.$input) {
+ if (this.$input.data('ui-autocomplete')) {
+ this.$input.autocomplete("destroy");
+ }
this.$input.closest(".modal .modal-content").off('scroll');
this.$input.off('keyup blur autocompleteclose autocompleteopen ' +
'focus focusout change keydown');