Memory leak when removing tabs
Hello, I'm building an ERP with angular-strap, and trying to use tabs to dynamic open complex documents, with forms and complex controls. I'm running into some memory leak issues, when I dynamically remove a tab. I wonder if someone could help me. I'm not sure if it's an angular-strap issue. I made a very simple plunker example, with a button to add a tab with big data, and then a button to close this tab.
Using the chrome developer tool on an embedded view, I took a heap snapshot before adding the big tab (67MB), then after adding the big tab (135MB) and then after removing the big tab (117MB). If you keep adding and removing the tab, the heap snapshots will grow until no end.
Does someone knows how to free the tab memory after closing it?
I found it my self! The bug is on the bsPane directive. It registers an render function at bsTabCtrl $activePaneChangeListeners, but it isn't removed by the $destroy event, and then doesn't free the memory. I made a fork on the plunker with the correction on tab.js.
Please send a PR.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.