mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +00:00
Cleared some temporary variables after use
To reduce memory consumption
This commit is contained in:
parent
89cac4c054
commit
bc16400ef2
@ -29,7 +29,9 @@ var JavaScriptParseTree = function(tree) {
|
||||
JavaScriptParseTree.prototype.render = function() {
|
||||
this.output = [];
|
||||
this.renderSubTree(this.tree);
|
||||
return this.output.join("");
|
||||
var r = this.output.join("");
|
||||
this.output = null;
|
||||
return r;
|
||||
};
|
||||
|
||||
// Render a subtree of the parse tree to an array of fragments of JavaScript source code
|
||||
|
@ -61,7 +61,9 @@ WikiTextParseTree.prototype.compile = function(type,treenode) {
|
||||
]
|
||||
}
|
||||
]);
|
||||
return parseTree.render();
|
||||
var r = parseTree.render();
|
||||
this.output = null;
|
||||
return r;
|
||||
};
|
||||
|
||||
WikiTextParseTree.prototype.pushString = function(s) {
|
||||
|
@ -47,7 +47,10 @@ WikiTextParser.prototype.parse = function(text) {
|
||||
this.dependencies = [];
|
||||
this.output = null;
|
||||
this.subWikify(this.children);
|
||||
return new WikiTextParseTree(this.children,this.dependencies,this.store);
|
||||
var tree = new WikiTextParseTree(this.children,this.dependencies,this.store);
|
||||
this.source = null;
|
||||
this.children = null;
|
||||
return tree;
|
||||
};
|
||||
|
||||
WikiTextParser.prototype.addDependency = function(dependency) {
|
||||
|
Loading…
Reference in New Issue
Block a user