Search and Top Navigation
#11125 closed bug (fixed)
Opened February 18, 2015 12:53PM UTC
Closed February 20, 2015 02:49PM UTC
Last modified March 10, 2015 04:16PM UTC
Dialog: Memory leak when destroying widgets that wrap their elements
Reported by: | stoychev | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.4 |
Component: | ui.dialog | Version: | 1.11.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Fiddle: http://jsfiddle.net/1odzx58L/
Happens with any widget that wraps its element. Use the Destroy & Recreate button to observe the memory increase after each click. Older jQuery UI versions seem to have the issue as well.
Attachments (0)
Change History (6)
Changed February 18, 2015 03:14PM UTC by comment:1
component: | ui.core → ui.dialog |
---|---|
status: | new → open |
summary: | Memory leak when destroying widgets that wrap their elements → Dialog: Memory leak when destroying widgets that wrap their elements |
Changed February 18, 2015 03:47PM UTC by comment:2
Here's a PR for the instances one: https://github.com/jquery/jquery-ui/pull/1448. If you still have problems after this lands we can keep digging.
Changed February 20, 2015 02:49PM UTC by comment:3
resolution: | → fixed |
---|---|
status: | open → closed |
Dialog: Stop tracking instance in destroy() to avoid memory leaks
Fixes #11125
Closes gh-1448
Changeset: ec1f393c39aa5bbac1158acf692271f8ce9518ce
Changed February 20, 2015 02:53PM UTC by comment:4
milestone: | none → 1.12.0 |
---|
Changed March 10, 2015 04:11PM UTC by comment:5
Dialog: Stop tracking instance in destroy() to avoid memory leaks
Fixes #11125
Closes gh-1448
(cherry picked from commit ec1f393c39aa5bbac1158acf692271f8ce9518ce)
Changeset: 04ab6e0388f248b2490c2bc663528657ba39051a
Changed March 10, 2015 04:16PM UTC by comment:6
milestone: | 1.12.0 → 1.11.4 |
---|
I'm going to make this ticket dialog specific as there shouldn't be anything inherit to the widget factory itself that causes this (feel free to provide me wrong though). You can create additional tickets for other widgets you observe this behavior in.
I can confirm the memory usage goes up in your fiddle. I've found at least one cause of the increase: the ui-dialog-instances data() that dialog uses does not get cleaned up in destroy().
stoychev > The more specific details you can provide here the better, as tracking down these leaks can be tricky.
And thanks!