summaryrefslogtreecommitdiff
path: root/src/intertyper.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-01 13:47:37 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-01 13:47:37 -0800
commit6b70b676ba4bdf317c2391e90c82d837b18e3849 (patch)
tree289553d5b7ba414840a6e4024dd48703cd56127f /src/intertyper.js
parent8794769222e617f5b35fb77973114d3d4a70dd14 (diff)
misc minor but important memory fixes
Diffstat (limited to 'src/intertyper.js')
-rw-r--r--src/intertyper.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index 45199091..ed2b3fb9 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -2,6 +2,7 @@
// to be processed by the later stages.
var tokenizer; // TODO: Clean this up/out
+ // XXX In particular, this closes over the substrate, which can keep stuff in memory, which is bad
function tokenize(text) {
return tokenizer.processItem({ lineText: text }, true);
}
@@ -30,7 +31,7 @@ function intertyper(data, sidePass, baseLineNum) {
}
}
- substrate = new Substrate('Intertyper');
+ var substrate = new Substrate('Intertyper');
// Line splitter. We break off some bunches of lines into unparsedBundles, which are
// parsed in separate passes later. This helps to keep memory usage low - we can start