-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialog: Stop tracking instance in destroy() to avoid memory leaks #1448
Conversation
@@ -155,6 +155,7 @@ return $.widget( "ui.dialog", { | |||
var next, | |||
originalPosition = this.originalPosition; | |||
|
|||
this._stopTrackingInstance(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't you just call ._untrackInstance()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I like that name better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
He didn't mean rename it, he meant there's already a function that does this, and it's called _untrackInstance()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that method works and it's even written nicer than mine. Changed.
Fixes #11125 Closes jquerygh-1448
d4f2556
to
4b6583c
Compare
I approve of this one line change ;-) |
👍 |
Fixes #11125