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

Commit ce392c2

Browse files
authored
fix memory leak problem when streaming huge files (#154)
PR reverts commits [2e4fcb](2e4fcb2) and [8c1206](8c1206e) that introduced memory leaks. Please squash merge. resolves #153
1 parent ba61bb5 commit ce392c2

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

bin.js

100644100755
File mode changed.

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ exports.parse = function (path, map) {
115115

116116
stream.queue(data)
117117
}
118+
if (this.value) delete this.value[this.key]
118119
for(var k in this.stack)
119120
if (!Object.isFrozen(this.stack[k]))
120121
this.stack[k].value = null

test/fixtures/depth.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@
1212
{"blbl": [{}, {"a":0, "b":1, "value":"3"}, 10]},
1313
{"value": 4}
1414
]
15-
}
15+
}

0 commit comments

Comments
 (0)