Errors, bugs, questions - page 1875
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Probably because you call it manually in the OnStart() function.
Destructors of static objects are called after this function in reverse order of declaration.
Probably because you call it manually in the OnStart() function.
Destructors of static objects are called after this function in reverse order of declaration.
But the leakage does occur. Where is the problem?
I think everything must work correctly here
But the leak is happening. Where is the problem?
You create two objects and delete only one.
Why do you needCLASS::Tmp object?
You create two objects and delete only one.
Where do you create two objects?
Why do you need aCLASS::Tmp object?
Thanks to you there's no need for it anymore. But to understand the language, I'd still like to understand why the example causes leakage.
Hidden objects with hidden constructors are logical in some cases, though (probably the most pervasive one).
Yes, I was mistaken. You have only one object being created and not deleted.
Because when you call the constructor
CLASS::Tmp still contains rubbish, not the address of the object.
2) class is created, new CLASS; it executes constructor CLASS()and CLASS::Ptr is assigned Null
3) CLASS::Tmp value is updated by the pointer to new CLASS
4) Deletes PTR<CLASS> structure CLASS::Ptr; executes destructor, tries to delete CLASS::Ptr (it is Null)
CLASS::Tmp still contains rubbish, not an object address.
Thank you! Somehow I didn't notice this obviousness.
1) A structure static PTR<CLASS> CLASS::Ptr is created;
2) Creates a class, new CLASS; runs constructor CLASS()andCLASS::Ptr is assigned Null
3) CLASS::Tmp value is updated by the pointer to new CLASS
4) Deletes PTR<CLASS> structure CLASS::Ptr; executes destructor, tries to delete CLASS::Ptr (it is Null)
Thank you. But it's not Null, it's trash.
It would be good if the mode
mode would not display arrows from trades (entries/exits). There is no need for them there at all.