This repository was archived by the owner on Feb 2, 2025. It is now read-only.
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
Memory Leak since scope is retained #1118
Closed
Description
What versions you are using?
- node version: v6.9.2
- npm version: 3.10.9
- angular version: 1.6.1
- jquery version: v3.1.1
- datatables version: 1.10.12
- angular-datatables version: 0.6.3-dev (last commit on angular 1)
- angular-cli version:
What's the problem?
I strongly use angular-datatables on my application and I've notice that I was leaking memory due angular-datatables directive.
I've done some memory tests using chrome dev tools on app examples provided, and I've found that is leaking memory. I seems that scope is retained. Please check the screenshot
Can you share your code?
I've only added a tag to the scope in oder to identify if it retained and not elegible for GC ( garbage collector) as recommended on this post http://www.dwmkerr.com/fixing-memory-leaks-in-angularjs-applications/
// Create a class, assign it to the scope. This'll help us
// see if $scope is leaked.
function AngularWayCtrlTag() {}
vm.__tag = new AngularWayCtrlTag();
I've also made the same tests for angular v2 and is also leaking memory
Regards.
Carlos