]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Tooltip: Destroy $tip, $arrow, $viewport to avoid memory leak
authorNiels Steenbeek <niels.steenbeek@solcon.nl>
Tue, 10 Mar 2015 14:38:04 +0000 (15:38 +0100)
committerChris Rebert <code@rebertia.com>
Tue, 21 Apr 2015 06:29:31 +0000 (23:29 -0700)
Closes #16039.

js/tooltip.js

index 27367880f7e636d2e74766043732a971813a59c9..789d04f7ab7e09fa652a245ea7fe6eee123519fa 100644 (file)
     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
     })
   }