Skip to content

4687 grid column leak #4704

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

Merged
merged 2 commits into from
Nov 16, 2015
Merged

4687 grid column leak #4704

merged 2 commits into from
Nov 16, 2015

Conversation

oriondean
Copy link
Contributor

Fixes another leak found in issue #4687 (leak begins when switching between two pages with grids present).

Caused by GridColumn's hideColumn + unsort methods overriden prototype of all constructed GridColumns each time a GridColumn is constructed. Each of these methods kept a reference to grid via the self property in the closure scope.

Prevent the grid column's hideColumn method being overridden each time a
GridColumn is constructed
Prevent the grid column's unsort method being overriden each time a GridColumn is constructed
* @methodOf ui.grid.class:GridColumn
* @description Hides the column by setting colDef.visible = false
*/
GridColumn.prototype.hideColumn = function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't see anywhere in the codebase where this method is actually called...

swalters added a commit that referenced this pull request Nov 16, 2015
@swalters swalters merged commit ed980e6 into angular-ui:master Nov 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants