Try to Cleanup Memory for Fix Memory Leaks ...
This commit is contained in:
@@ -475,6 +475,16 @@ class XCX121XATRHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XATRHelper()
|
||||
{
|
||||
//
|
||||
ArrayFree(rsiBuffer);
|
||||
ArrayFree(atrUpperBuffer);
|
||||
ArrayFree(atrLowerBuffer);
|
||||
ArrayFree(atrBuffer);
|
||||
ArrayFree(atrUpperRawBuffer);
|
||||
ArrayFree(atrLowerRawBuffer);
|
||||
|
||||
//
|
||||
mInputs.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
@@ -482,7 +492,7 @@ class XCX121XATRHelper : public XCBaseHelper
|
||||
bool Init(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
X121XATRInputs &inputs // Inputs
|
||||
X121XATRInputs &inputs // Inputs
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -880,8 +890,8 @@ class XCX121XATRHelper : public XCBaseHelper
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XATRConditions &conditions, //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -420,6 +420,18 @@ class XCX121XCHEHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XCHEHelper()
|
||||
{
|
||||
//
|
||||
mInputs.Clean();
|
||||
|
||||
//
|
||||
ArrayFree(le1Buffer);
|
||||
ArrayFree(se1Buffer);
|
||||
ArrayFree(le2Buffer);
|
||||
ArrayFree(se2Buffer);
|
||||
ArrayFree(le1StartBuffer);
|
||||
ArrayFree(se1StartBuffer);
|
||||
ArrayFree(le2StartBuffer);
|
||||
ArrayFree(se2StartBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -421,6 +421,18 @@ class XCX121XDONHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XDONHelper()
|
||||
{
|
||||
//
|
||||
mInputs.Clean();
|
||||
|
||||
//
|
||||
ArrayFree(donOpenUpperBuffer);
|
||||
ArrayFree(donOpenLowerBuffer);
|
||||
ArrayFree(donHighUpperBuffer);
|
||||
ArrayFree(donHighLowerBuffer);
|
||||
ArrayFree(donLowUpperBuffer);
|
||||
ArrayFree(donLowLowerBuffer);
|
||||
ArrayFree(donCloseUpperBuffer);
|
||||
ArrayFree(donCloseLowerBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -428,7 +440,7 @@ class XCX121XDONHelper : public XCBaseHelper
|
||||
bool Init(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
X121XDONInputs &inputs // Inputs
|
||||
X121XDONInputs &inputs // Inputs
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -950,8 +962,8 @@ class XCX121XDONHelper : public XCBaseHelper
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XDONConditions &conditions, //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -514,6 +514,23 @@ class XCX121XPVHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XPVHelper()
|
||||
{
|
||||
//
|
||||
mInputs.Clean();
|
||||
|
||||
//
|
||||
ArrayFree(peaksBuffer);
|
||||
ArrayFree(valesBuffer);
|
||||
ArrayFree(sarBuffer);
|
||||
ArrayFree(cHHBuffer);
|
||||
ArrayFree(cLLBuffer);
|
||||
ArrayFree(sHHBuffer);
|
||||
ArrayFree(sLLBuffer);
|
||||
ArrayFree(mHHBuffer);
|
||||
ArrayFree(mLLBuffer);
|
||||
ArrayFree(lHHBuffer);
|
||||
ArrayFree(lLLBuffer);
|
||||
ArrayFree(hHHBuffer);
|
||||
ArrayFree(hLLBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -354,6 +354,16 @@ class XCX121XSTRHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XSTRHelper()
|
||||
{
|
||||
//
|
||||
mInputs.Clean();
|
||||
|
||||
//
|
||||
ArrayFree(strBuffer);
|
||||
ArrayFree(atrBuffer);
|
||||
ArrayFree(strPriceBuffer);
|
||||
ArrayFree(strUpBuffer);
|
||||
ArrayFree(strDownBuffer);
|
||||
ArrayFree(strStateBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -463,13 +463,25 @@ class XCX121XVWAPHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCX121XVWAPHelper()
|
||||
{
|
||||
//
|
||||
mInputs.Clean();
|
||||
|
||||
//
|
||||
ArrayFree(vwapFastBuffer);
|
||||
ArrayFree(vwapMidBuffer);
|
||||
ArrayFree(vwapSlowBuffer);
|
||||
ArrayFree(vwapVolumeBuffer);
|
||||
ArrayFree(vwapPriceBuffer);
|
||||
ArrayFree(vwapFastStateBuffer);
|
||||
ArrayFree(vwapMidStateBuffer);
|
||||
ArrayFree(vwapSlowStateBuffer);
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
bool Init(
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
string symbol, // Trading Symbol
|
||||
ENUM_TIMEFRAMES period, // Trading Period
|
||||
X121XVWAPInputs &inputs // Inputs
|
||||
)
|
||||
{
|
||||
@@ -1032,8 +1044,8 @@ class XCX121XVWAPHelper : public XCBaseHelper
|
||||
//
|
||||
bool GetConditions(
|
||||
X121XVWAPConditions &conditions, //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
int barIndex = 0, //
|
||||
int loopback = 5 //
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -135,19 +135,23 @@ class XCXCCHelper : public XCBaseHelper
|
||||
{
|
||||
//
|
||||
// Public ...
|
||||
public:
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
// Constructors ...
|
||||
XCXCCHelper() : XCBaseHelper(_Symbol, _Period)
|
||||
XCXCCHelper()
|
||||
: XCBaseHelper(_Symbol, _Period)
|
||||
{
|
||||
}
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
~XCXCCHelper() {}
|
||||
~XCXCCHelper()
|
||||
{
|
||||
mInputs.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
// Tools ...
|
||||
@@ -232,10 +236,10 @@ public:
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
protected:
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
private:
|
||||
//
|
||||
// Props ...
|
||||
XCCInputs mInputs; // Inputs ...
|
||||
|
||||
@@ -138,6 +138,7 @@ class XCXCTHelper : public XCBaseHelper
|
||||
// Deconstructor ...
|
||||
~XCXCTHelper()
|
||||
{
|
||||
mInputs.Clean();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user