Memory Leak Bug Fixed
This commit is contained in:
1 parent
363ce4d302
commit
e96ce4e484
2 files changed
+22
-3
No files matched your search
+12
-2
@@ -8,6 +8,7 @@
|
||||
const GMT_SECONDS = ':00.000 GMT+0000';
|
||||
|
||||
let thisObject = {
|
||||
finalize: finalize,
|
||||
runSimulation: runSimulation,
|
||||
buildPercentageBandwidthArray: buildPercentageBandwidthArray,
|
||||
buildBollingerBandsArray: buildBollingerBandsArray,
|
||||
@@ -28,6 +29,15 @@
|
||||
|
||||
return thisObject;
|
||||
|
||||
function finalize() {
|
||||
percentageBandwidthAt = undefined
|
||||
bollingerBandsAt = undefined
|
||||
bollingerChannelsAt = undefined
|
||||
bollingerSubChannelsAt = undefined
|
||||
candlesAt = undefined
|
||||
thisObject = undefined
|
||||
}
|
||||
|
||||
async function runSimulation(
|
||||
timePeriod,
|
||||
timePeriodLabel,
|
||||
@@ -2735,8 +2745,8 @@
|
||||
|
||||
i++
|
||||
if (i < candles.length) {
|
||||
// process.nextTick(loop)
|
||||
setTimeout(loop, 100)
|
||||
process.nextTick(loop)
|
||||
//setTimeout(loop, 100)
|
||||
} else {
|
||||
afterLoop()
|
||||
}
|
||||
|
||||
@@ -12,10 +12,11 @@
|
||||
|
||||
const ONE_DAY_IN_MILISECONDS = 24 * 60 * 60 * 1000;
|
||||
|
||||
const commons = COMMONS.newCommons(bot, logger, UTILITIES);
|
||||
let commons = COMMONS.newCommons(bot, logger, UTILITIES);
|
||||
|
||||
thisObject = {
|
||||
initialize: initialize,
|
||||
finalize: finalize,
|
||||
start: start
|
||||
};
|
||||
|
||||
@@ -44,6 +45,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
function finalize() {
|
||||
commons.finalize()
|
||||
commons = undefined
|
||||
utilities = undefined
|
||||
assistant = undefined
|
||||
thisObject = undefined
|
||||
}
|
||||
|
||||
function start(multiPeriodDataFiles, timePeriod, timePeriodLabel, currentDay, startDate, endDate, interExecutionMemory, callBackFunction) {
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user