Opened 10 years ago
Last modified 10 years ago
#9358 open bug
Resizable: Memory leak when destroying
Reported by: | lsching17 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.resizable | Version: | 1.10.3 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
i create a testcase and access a "dummyObject" by closure during "open" event.
If event handlers are detached after "destroy", then the "dummyObject" should be inaccessible and be garbage-collected.
But chrome heapshot shows that the "dummyObject" is still accessible, and i suspect that the event handlers are not detached
Change History (6)
comment:1 Changed 10 years ago by
Component: | ui.core → ui.resizable |
---|---|
Status: | new → open |
Summary: | event handler of dialog are not detached when destroy? → Resizable: Memory leak when destroying |
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
Ah yeah, I meant to say _renderAxis
in my previous comment. Still confusing why that would be holding a reference since the instance is gone. That'll help though, thanks.
comment:5 Changed 10 years ago by
I created a BAD patch for jquery-ui.js (1.10.3) and linkage seems fixed, but do not know whether the widgets are broken.
http://jsbin.com/iqeyat/18/ http://jsbin.com/iqeyat/17/
::diff removed::
comment:6 Changed 10 years ago by
@lsching17 If you'd like to propose a change, please sign our CLA and submit a pull request.
I'm not exactly sure what's going on here but this appears to be a problem with resizable and not dialog. Hit create and then destroy and the dummyObject instance will not be garbage collected: http://jsbin.com/iqeyat/14/edit.
Isching17 do you know if Chrome's dev tools give you any help tracking down line numbers / variable names? Or is it just function names? On this example (http://jsbin.com/iqeyat/14/edit)
_alsoResize
is the only specific thing I see and I don't see anything suspicious in there: https://github.com/jquery/jquery-ui/blob/6df5c1a4ae738e591694e0fe2fa3bbb8b05f6b0a/ui/jquery.ui.resizable.js#L874.Thanks.