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

Memory leak: Table, TableMeta and TableProperty classes are retained in memory after destruction when using table/column modifiers or column.getValueForRow #266

Closed
johanrd opened this issue Apr 18, 2024 · 2 comments

Comments

@johanrd
Copy link
Contributor

johanrd commented Apr 18, 2024

  1. Clone this repo and run the docs app
  2. Enter the index route and see that there is one instance of the Table class is retained in Heap memory. This is expected.
  3. Exit the route and enter /testing (a route without a rendered table), then re-enter the index route. Now, see that the Table class retained in memory twice.
  4. Repeat exiting and entering the same routes, and see that for each exit of the index route, new instances of the Table class are retained in memory:
Screen.Recording.2024-04-18.at.15.02.02.mov

This is also reproducible in my own webapp whenever I use a table or column modifier, or use the column.getValueForRow helper.

Removing all the modifiers and {{column.getValueForRow row}} from demo-a.md resolves the issue, so this is most likely caused by columns not being teared down correctly.

@NullVoxPopuli
Copy link
Contributor

NullVoxPopuli commented Apr 19, 2024

there has been a memory leak in glimmer-vm around locally defined helpers and modifiers prior to ember-source 5.6 -- I believe if the docs app upgrades to ember-source 5.6+ the memory leak would be resolved

More info here:

johanrd added a commit to johanrd/ember-headless-table that referenced this issue Apr 20, 2024
@johanrd
Copy link
Contributor Author

johanrd commented Apr 20, 2024

@NullVoxPopuli Thanks!

I can verify that this is not reproducible if I run the docs-app with ember-source@5.8.0😌

@johanrd johanrd closed this as completed Apr 20, 2024
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

No branches or pull requests

2 participants