How to remove dynamic objects from indicator
Hello,
my indicator has some new xobject.
When the indicator is detached, i get memory leaks as there is no onDeinit method.
How to catch the detach event ?
Thank you
Hello,
my indicator has some new xobject.
When the indicator is detached, i get memory leaks as there is no onDeinit method.
How to catch the detach event ?
Thank you
You should add OnDeinit manually by hand, I don't know why its not there anymore when creating CI.
//+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- indicator deinitialization //--- return; }
Then create some codes to delete your object
You should add OnDeinit manually by hand, I don't know why its not there anymore when creating CI.
Then create some codes to delete your object
- www.mql5.com
Hello,
thank you for answers,
void OnDeinit(const int reason)
is called on chart detach, so it solved my problem.
Hello,
my indicator has some new xobject.
When the indicator is detached, i get memory leaks as there is no onDeinit method.
How to catch the detach event ?
Thank you