Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit e61eae1

Browse files
vojtajinapetebacondarwin
authored andcommitted
fix($parse): remove references to last arguments to a fn call
This can be an issue if running (and killing) multiple apps/injectors on the same page. The `args` array holds references to all previous arguments to a function call and thus they cannot be garbage-collected. In a regular (one app/injector on a page) app, this is not an issue. Closes #10894
1 parent 400fbbf commit e61eae1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ng/parse.js

+5
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,11 @@ Parser.prototype = {
728728
? fn.apply(context, args)
729729
: fn(args[0], args[1], args[2], args[3], args[4]);
730730

731+
if (args) {
732+
// Free-up the memory (arguments of the last function call).
733+
args.length = 0;
734+
}
735+
731736
return ensureSafeObject(v, expressionText);
732737
};
733738
},

0 commit comments

Comments
 (0)