From 7429fc7ff965147fe218b3b4e124d922b08118f2 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Tue, 10 Mar 2015 15:38:04 +0100 Subject: [PATCH] Tooltip: Destroy $tip, $arrow, $viewport to avoid memory leak Closes #16039. --- js/tooltip.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/tooltip.js b/js/tooltip.js index 27367880f7..789d04f7ab 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -440,6 +440,12 @@ clearTimeout(this.timeout) this.hide(function () { that.$element.off('.' + that.type).removeData('bs.' + that.type) + if (that.$tip) { + that.$tip.detach() + } + that.$tip = null + that.$arrow = null + that.$viewport = null }) }