JavaScript Memory Leak: #columnPreview click handlers #12058
Closed
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
renderDashboard
adds click handlers to#columnPreview
divs every time the user visits the dashboard, and never removes them:https://github.com/piwik/piwik/blob/defc5469a5d4634d64023477a447a31c58812a12/plugins/Dashboard/angularjs/dashboard/dashboard.directive.js#L49
The result is a small memory leak.
Solution
A quick fix is to add the following just before you add the new listeners:
If you are concerned about the possibility of there being other
click
handlers installed on the divs, you can namespace your handlers:The text was updated successfully, but these errors were encountered: