diff options
| author | Christophe Matthieu <chm@odoo.com> | 2016-09-01 15:26:41 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2016-11-04 14:07:35 +0100 |
| commit | a8e79e960aa962b4b89710918a03a5983bf492c6 (patch) | |
| tree | 92d5dcc5685adf5c49c64d7b8e2d1d644470409c /addons/web/static/src/js/framework | |
| parent | 3cb337945628ffc243072c93a47f6fc55d0f03fd (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/framework')
| -rw-r--r-- | addons/web/static/src/js/framework/view.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/view.js b/addons/web/static/src/js/framework/view.js index b234d02390f..bc06d062819 100644 --- a/addons/web/static/src/js/framework/view.js +++ b/addons/web/static/src/js/framework/view.js @@ -258,6 +258,12 @@ var View = Widget.extend({ get_context: function () { return {}; }, + destroy: function () { + if (this.$buttons) { + this.$buttons.off(); + } + return this._super.apply(this, arguments); + }, }); return View; |
