Skip to main content

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 tj.vantoll comment:1

component: ui.coreui.dialog
status: newopen
summary: Memory leak when destroying widgets that wrap their elementsDialog: Memory leak when destroying widgets that wrap their elements

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!

Changed February 18, 2015 03:47PM UTC by tj.vantoll 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 TJ VanToll comment:3

resolution: → fixed
status: openclosed

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 scottgonzalez comment:4

milestone: none1.12.0

Changed March 10, 2015 04:11PM UTC by TJ VanToll 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 scottgonzalez comment:6

milestone: 1.12.01.11.4