This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Memory leak in tests due to $injector
being attached to $rootElement
#14094
Milestone
Comments
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Feb 20, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. This commit prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes angular#14094
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Feb 20, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. This commit prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes angular#14094
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Feb 20, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. This commit prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes angular#14094
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Feb 21, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. This commit prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes angular#14094
gkalpak
added a commit
to gkalpak/angular.js
that referenced
this issue
Feb 21, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. This commit prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes angular#14094
gkalpak
added a commit
that referenced
this issue
Feb 22, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. 88bb551 was revert with 1b8590a. This commit incorporates the changes from 88bb551 and prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes #14094 Closes #14098
gkalpak
added a commit
that referenced
this issue
Feb 22, 2016
Starting with 88bb551, `ngMock` will attach the `$injector` to the `$rootElement`, but will never clean it up, resulting in a memory leak. Since a new `$rootElement` is created for every test, this leak causes Karma to crash on large test-suites. The problem was not detected by our internal tests, because we do our own clean-up in `testabilityPatch.js`. 88bb551 was revert with 1b8590a. This commit incorporates the changes from 88bb551 and prevents the memory leak, by cleaning up all data attached to `$rootElement` after each test. Fixes #14094 Closes #14098
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
#14034 introduced the following memory leak in tests using
angular-mocks
:The
$injector
is attached to the$rootElement
(like this) and is never cleaned up.Since a new
$rootElement
is created for every test, the leak causes Karma to crash on large test-suites.The text was updated successfully, but these errors were encountered: