Skip to content

Commit

Permalink
memory management
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahparker committed Oct 11, 2019
1 parent b91aa6b commit b27d01f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion camera/ptpjs/drivers/canon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions intervalometer/intervalometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
}
});
}
}
Expand Down

0 comments on commit b27d01f

Please sign in to comment.