Commit 7429fc7f authored by Niels Steenbeek's avatar Niels Steenbeek Committed by Chris Rebert

Tooltip: Destroy $tip, $arrow, $viewport to avoid memory leak

Closes #16039.
parent 09f98453
...@@ -440,6 +440,12 @@ ...@@ -440,6 +440,12 @@
clearTimeout(this.timeout) clearTimeout(this.timeout)
this.hide(function () { this.hide(function () {
that.$element.off('.' + that.type).removeData('bs.' + that.type) that.$element.off('.' + that.type).removeData('bs.' + that.type)
if (that.$tip) {
that.$tip.detach()
}
that.$tip = null
that.$arrow = null
that.$viewport = null
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment