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 when using ngView and jquery #8061
Comments
jquery >= 2.0 is currently unsupported. Still something to keep in mind, though. |
jQuery >=2.1 is supported in Angular 1.3 until yesterday. ;) (see 9e7cb3c). It's also the only supported version now. Angular 1.2 remains compatible with jQuery 1.x only, though. |
Closed
When using the correct versions of JQuery and AngularJS together I don't see this memory leak. @georgiyordanov can you confirm this is the case for you too? |
Pete, what do you exactly mean by correct versions here? EDIT: @georgiyordanov is it an issue for you with Angular 1.3.0-rc.2 and jQuery 2.1.1? |
What I mean is the following combinations:
|
I tested it with jQuery 2.1.1 and Angular 1.3.0-rc3 and everything is OK. |
Marvellous. Thanks @georgiyordanov |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The following plunker demonstrates the issue:
http://plnkr.co/edit/BS7EQlBoJDfbMN8bcUop?p=preview
Switching between View1 and View2 a few times makes heap snapshots go up to 40-50 MB.
The problem is related to jquery >= v2.0. Switching to jquery 1.11.1 fixes the problem.
Using a directive with templateUrl and replace=true (which I know is deprecated since 1.2.17) in the view is also needed.
Reproducible: always
Browsers: Chrome 35, Chrome canary (with --js-flags="--nocrankshaft --noopt --nouse-ic") and possibly Firefox 30 (memory goes up easily to 400-500 MB but I don't know a way to force GC in FF)
Operating system: Windows 8
The text was updated successfully, but these errors were encountered: