-
Notifications
You must be signed in to change notification settings - Fork 779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Memory Leak] beforeEach / afterEach appear to leak #841
Comments
A quick spelunk indicates the above offending code is likely just run in the wrong order and incorrect object. if: this.testEnvironment = extend( {}, this.module.testEnvironment );
delete this.testEnvironment.beforeEach;
delete this.testEnvironment.afterEach; becomes: delete this.module.testEnvironment.beforeEach;
delete this.module.testEnvironment.afterEach;
this.testEnvironment = extend( {}, this.module.testEnvironment ); We release as expected, without any leaks. |
stefanpenner
added a commit
to stefanpenner/qunit
that referenced
this issue
Aug 4, 2015
stefanpenner
added a commit
to stefanpenner/qunit
that referenced
this issue
Aug 4, 2015
leobalter
pushed a commit
to leobalter/qunit
that referenced
this issue
Aug 7, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the following code (from : source) appears to leak
beforeEach
andafterEach
on the original module. This results in per module leak of the ambient context.Obviously the following, prevents the leaks:
but it is tedious and error prone. A much better solution, for those using modules (AMD/CJS/etc), is merely to release the entirely module. Unfortunately, QUnit retaining
beforeEach
andafterEach
per module, prevents a less error prone and tedious solution.cc @cibernox
The text was updated successfully, but these errors were encountered: