Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert code that caused a memory leak
Summary: As I was refactoring how we do code injection I noticed that the `this.instances` in PJSOutput wasn't hooked up to anything so `if (this.instances) { this.instances.push(obj); }` wasn't doing anything. To "fix" this I added an `instances` array to the PJSOutput class object and modified the `injectCode` instance method to use `PJSOutput.instances` instead. Now that PJSOutput had an `instances` array, we were pushing every object ever created onto that array. I thought that reset the array whenever `injectCode` was called would handle memory issues but I hadn't considered programs that new up object indefinitely. This diff reverts these changes. This means that all code having to do with `instances` does nothing. I'll remove this code in a following diff. Test Plan: - test/output/pjs/index.html Reviewers: pamela, john Reviewed By: john Differential Revision: https://phabricator.khanacademy.org/D25010
- Loading branch information
1 parent
77d5703
commit 0115512
Showing
3 changed files
with
12 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters