Once the ALengths array is run in the bInit routine it is no longer needed.
How do I delete the array to release resources?
This is just a simple example.
Thanks
wayne
How do I delete the array to release resources?
This is just a simple example.
Thanks
wayne
PHP Code:
debugClear();
function preMain(){
setPriceStudy(true);
}
var bInit = false;
var vFontColor9 = Color.red;
var vFontColor13 = Color.blue;
var vFontColor56 = Color.green;
var ALengths = new Array("9","13","56");
var PlotArray = new Array();
function main(){
if ( bInit == false ) {
for (i=0; i<=ALengths.length-1; i++){
var TempFColor = "vFontColor" + ALengths[i]
debugPrintln(i + " - " + TempFColor);
setDefaultBarFgColor(eval(TempFColor), i);
var TempEMA = "Study" + ALengths[i] + " = ema(" + ALengths[i] + ")";
eval(TempEMA)
TempEMASeries = "Study" + ALengths[i] + " = getSeries(" + "Study" + ALengths[i] + ")";
eval(TempEMASeries);
PlotArray.push(eval("Study" + ALengths[i]));
}
bInit = true;
}
return (PlotArray);
}
Comment