Your class/struct has no destructor, therefor nothing "happened with the object and object data of the copy." You had two copies of the indicator's handle. then you have one.
If you release the indicator, then yes "the indicator handle of the copy becomes invalid." (MQLx has no pointers only a descriptor.)
Explain what? You haven't asked a question.
Your class/struct has no destructor, therefor nothing "happened with the object and object data of the copy." You had two copies of the indicator's handle. then you have one.
If you release the indicator, then yes "the indicator handle of the copy becomes invalid." (MQLx has no pointers only a descriptor.)
Explain what? You haven't asked a question.
Thank you for your answer. I solved it, it was too late and i was coding too long ..just saw only if's and while's.
Next day i did a review of the code and saw my fauxpas, i used the delete() at the wrong place, so the descriptor becomes invalid.
It's a bit irritating -> "MQLx has no pointers" but the function calls "GetPointer()" and "CheckPointer()". ;)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey all,
i have a understanding question. When i create a struct which has a object and a loaded indicator in it, like this:
Now i create a copy of if:
After finish work, i cleanup structure "foo" and lets say, reassign structure "foo2" to "foo".
During the cleanup i delete the object with:
When i delete the object in the structure whats happened with the object and object data of the copy ? Like when inside of the object a indicator is with id xy, which exists hat this moment twice. If in the destructor is a routine to release the indicator, then the indicator pointer of the copy becomes invalid.
Does someone can explane me that ?
Thank you in advanvced