Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

tjvantoll
Copy link
Member

Fixes #11125

@@ -155,6 +155,7 @@ return $.widget( "ui.dialog", {
var next,
originalPosition = this.originalPosition;

this._stopTrackingInstance();
Copy link
Member

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()?

Copy link
Member Author

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.

Copy link
Member

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().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh

Copy link
Member Author

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.

@scottgonzalez
Copy link
Member

I approve of this one line change ;-)

@jzaefferer
Copy link
Member

👍

@tjvantoll tjvantoll closed this in ec1f393 Feb 20, 2015
tjvantoll added a commit that referenced this pull request Mar 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants