Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Merge branch 'memory-leak'
Browse files Browse the repository at this point in the history
Conflicts:
  package.json
  • Loading branch information
dominictarr committed Mar 9, 2015
2 parents a45e9ee + fe97869 commit 0f76de2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,15 @@ exports.parse = function (path, map) {
while (true) {
c = (j === this.stack.length) ? this : this.stack[j]
if (!c) return
if (check(nextKey, c.key)) { i++; break}
if (check(nextKey, c.key)) {
i++;
this.stack[j].value = null
break
}
j++
}
}

}
if (j !== this.stack.length) return

Expand All @@ -80,6 +85,8 @@ exports.parse = function (path, map) {
if(null != (data = map ? map(data, actualPath) : data))
stream.queue(data)
delete this.value[this.key]
for(var k in this.stack)
this.stack[k].value = null
}
parser._onToken = parser.onToken;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0f76de2

Please sign in to comment.