Try to Cleanup Memory for Fix Memory Leaks ...

This commit is contained in:
2025-01-17 02:19:22 +03:30
parent 46c38f8f54
commit 3c2de65f40
23 changed files with 842 additions and 382 deletions
@@ -44,7 +44,7 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
//
// Constructor(s) ...
void XCX121SMCBaseStrategy(
XCX121SMCBaseStrategy(
//
// Base ...
string _symbol, // Trading Symbol
@@ -61,7 +61,7 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
//
// Deconstructor ...
void ~XCX121SMCBaseStrategy()
~XCX121SMCBaseStrategy()
{
DeInit();
}
@@ -500,6 +500,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
// Waits Until Next Candle if Current Tick has Guard ...
mGuardBarTracker.Waits();
//
ArrayFree(positions);
//
return result;
}
@@ -863,6 +866,9 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
{
AddObjectIfNotExists(objects[i]);
}
//
ArrayFree(objects);
}
//
@@ -959,6 +965,10 @@ class XCX121SMCBaseStrategy : public XCBaseAlert
//
delete mPOIDrawer;
//
ArrayFree(mTicks);
ArrayFree(mSignalEventHandlers);
//
Destroy();
}
@@ -1108,8 +1108,7 @@ class XC121SMCCycleHelper : public XCBase
{
//
delete mX121Helper;
//
delete mPOIDetector;
delete mBarAnalyser;
}
@@ -1628,6 +1628,14 @@ class XC121SMCTradeHandler : public XCBaseAlert
// Deconstructor ...
~XC121SMCTradeHandler()
{
//
ArrayFree(mData);
ArrayFree(mSymbolInfos);
ArrayFree(mLastExecutedSignals);
//
delete mDrawer;
//
delete mTrader;
delete mCollector;
@@ -3882,7 +3890,6 @@ class XC121SMCTradeHandler : public XCBaseAlert
double mHedgeingMinRequiredProfitPerVolumeStep; // Minimum Required Profit Per Volume Step for Hedging ...
//
XCBarAnalyser mBarAnalyser;
XCPOIDrawer *mDrawer;
//