This repository was archived by the owner on Feb 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 490
Externally destroying a DataTable can lead to a memory leak #377
Labels
Comments
I see. Thanks for reporting it 👍 |
I think it's resolved with #326. Using Chrome timeline, with leak: Is it the number of listeners? Thanks! |
Any updates on this issue? |
Unfortunately, as Angular 2 is coming out, I lack the motivation to find the fix for this peculiar bug for the versions 0.X.X of angular-datatables... If some kind soul is willing to fix this... 😖 |
Closing as issue is too old and the version is no longer maintained. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've recently been looking into a memory leak issue for a DataTables user who makes use of your handy library (thanks for providing it!).
What appears to be happening is that the DataTable is being destroyed use the DataTables
destroy()
method, but then the data source that has been powering the DataTable data (from anng-repeat
) is updated. That is causing the DataTable to be reinitialised by this library and thus a leak occurs.I've put an example together showing the issue. To reproduce, just start a profile in Chrome and then run the
run()
method in the console.I've also put an example together that does not modify the data source after the DataTable has been destroyed and does not exhibit this issue.
As a possible fix, perhaps it would be possible to listen for the
destroy.dt
event from DataTables and when found, stop performing any updates to the DataTable. This would require an external destroy event to be distinguished from an internal one, as I see you use the destroy at lot internally.The text was updated successfully, but these errors were encountered: