From 23632576071beac9e259d071d70549b981528198 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Tue, 5 Aug 2014 10:20:07 -0600 Subject: [PATCH] Only free memory if streaming or chunking (fixes #74) --- papaparse.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/papaparse.js b/papaparse.js index 4bf770d..fc1e6f5 100644 --- a/papaparse.js +++ b/papaparse.js @@ -1187,11 +1187,13 @@ meta: msg.results.meta }); } + delete msg.results; // free memory ASAP } else if (isFunction(worker.userChunk)) + { worker.userChunk(msg.results, msg.file); - - delete msg.results; // free memory ASAP + delete msg.results; + } } if (msg.finished)