#11125 closed bug (fixed)
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.
Change History (6)
comment:1 Changed 8 years ago by
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 |
comment:2 Changed 8 years ago by
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.
comment:3 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | open → closed |
Dialog: Stop tracking instance in destroy() to avoid memory leaks
Fixes #11125 Closes gh-1448
Changeset: ec1f393c39aa5bbac1158acf692271f8ce9518ce
comment:4 Changed 8 years ago by
Milestone: | none → 1.12.0 |
---|
comment:5 Changed 8 years ago by
Dialog: Stop tracking instance in destroy() to avoid memory leaks
Fixes #11125 Closes gh-1448 (cherry picked from commit ec1f393c39aa5bbac1158acf692271f8ce9518ce)
Changeset: 04ab6e0388f248b2490c2bc663528657ba39051a
comment:6 Changed 8 years ago by
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!