-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
37caa3a
commit c02d49d
Showing
5 changed files
with
101 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'ember-headless-table': patch | ||
--- | ||
|
||
Address an issue where instances of plugins would be held on to after a Table is destroyed. | ||
|
||
This caused a memory leak due how plugins, and their associated metadata, held on to | ||
Table instances, which in turn, held on to the owner / container. | ||
|
||
This was caused by the utility methods in `ember-headless-table/plugins`, | ||
|
||
- `preferences` | ||
- `meta` | ||
- `options` | ||
|
||
Because data was stored in (Weak)Maps in module-space. | ||
This alone isn't a problem, but they were never cleaned up when the table was destroyed. | ||
|
||
Cleanup of these objects could have occured via `associateDestroyableChild` and `registerDestructor` | ||
from `@ember/destroyable`, but it was easier to instead have this happen automatically via hosting the | ||
data needed for the "plugins utils" on the table itself. Since each plugin util requires "some instance of something", | ||
be that a row, column, or table, there is a direct path to the table, and therefor a direct way to access | ||
memory-scoped (Weak)Maps. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters