This PR fixes a memory leak that due to the root node not being destroyed when its dependency key columns is invalidated.
The reason this leaks memory is because some nodes in the ColumnTree structure add observers, and those observers are stored in a global map. If we don't explicitly destroy them the observers are never removed.
This PR fixes a memory leak that due to the root node not being destroyed when its dependency key
columns
is invalidated.The reason this leaks memory is because some nodes in the ColumnTree structure add observers, and those observers are stored in a global map. If we don't explicitly destroy them the observers are never removed.
This exact pattern is already in use in this codebase for the CollapseTree: https://github.com/Addepar/ember-table/blob/master/addon/-private/collapse-tree.js#L810-L812