From b27d01f03bdae719d950de15870ffc367f86f4b7 Mon Sep 17 00:00:00 2001 From: Elijah Parker Date: Fri, 11 Oct 2019 15:19:08 -0500 Subject: [PATCH] memory management --- camera/ptpjs/drivers/canon.js | 2 +- intervalometer/intervalometer.js | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/camera/ptpjs/drivers/canon.js b/camera/ptpjs/drivers/canon.js index e34117b30..0f41fe4b7 100644 --- a/camera/ptpjs/drivers/canon.js +++ b/camera/ptpjs/drivers/canon.js @@ -627,7 +627,7 @@ function pollEvents(camera, callback) { } } if(!found) { - _logD("unknown prop change", ptp.hex(event_item), " = ", ptp.hex(event_value)); + //_logD("unknown prop change", ptp.hex(event_item), " = ", ptp.hex(event_value)); } } else if(event_type == EOS_EC_PROPERTY_VALUES) diff --git a/intervalometer/intervalometer.js b/intervalometer/intervalometer.js index aa877c9fe..3c32e5c84 100644 --- a/intervalometer/intervalometer.js +++ b/intervalometer/intervalometer.js @@ -1007,6 +1007,7 @@ function setupExposure(cb) { busyExposure = true; log("\n\nEXP: setupExposure"); + var diff = 0; if(intervalometer.status.hdrSet && intervalometer.status.hdrSet.length > 0) { if(!intervalometer.status.hdrIndex) intervalometer.status.hdrIndex = 0; @@ -1399,6 +1400,11 @@ function runPhoto(isRetry) { busyKeyframes = false; pendingPhoto = false; }); + try { + if (global.gc) {global.gc();} + } catch (e) { + console.log("INTERVALOMETER: garbage collection failed:", e); + } }); } else { if (intervalometer.status.rampEv === null) { @@ -1533,6 +1539,12 @@ function runPhoto(isRetry) { pendingPhoto = false; log("INTERVALOMETER: KF completed."); }); + + try { + if (global.gc) {global.gc();} + } catch (e) { + console.log("INTERVALOMETER: garbage collection failed:", e); + } }); } }