Errors, bugs, questions - page 2795

 
Artyom Trishkin:
I think you add all the pointers to the list. Terminal subsystem itself removes such objects, pointers to which lie in CArrayObj list

Here you have a potential memory leak.

If there is a memory leak ( by pointer the object was not deleted), then on completion the log says which and how many objects were not deleted and how much memory was not freed. But I didn't have anything like that. Objects are deleted, but their chart objects are not all deleted.

Rashid Umarov noticed the problem is that the graph has no time to process such a great number of commands to delete objects from the list! What do memory leaks have to do with it?
Документация по MQL5: Основы языка / Типы данных / Указатели объектов
Документация по MQL5: Основы языка / Типы данных / Указатели объектов
  • www.mql5.com
//| Script program start function                                    | //|  Объекты всегда передаются по ссылке                             | //| Передача массива объектов                                        | //| Передача массива указателей на объект                            |
 
Mihail Matkovskij:

This is only in the example. In the indicator I'm working on, the names are quite complicated. And I made the example just for demonstration purposes.

What is the problem with prefixing it? Maybe you should have checked it first?

 
Mihail Matkovskij:

If there is a memory leak ( by pointer object was not deleted), then on completion the log says which and how many objects were not deleted and how much memory was not freed. But I didn't have anything like that. Objects are deleted, but their chart objects are not all deleted.

Rashid Umarov noticed the problem is that the chart doesn't have time to process such a large number of commands to delete objects from the chart! What do memory leaks have to do with it?
I wrote "potential". It means you will have to search again later. It's better to do it right away.
 
Alexey Viktorov:

What's the problem with doing a prefix? Maybe you should have checked this option first?

I have to redo all algorithms of naming objects in my indicator and I don't know if it will work... There is a lot of code, believe me.

Maybe there is another way. For example, first call ObjectDelete for all objects, and then, after a delay, call ObjectFind. And again delete those objects that have not been deleted. And so until their number is 0. How can you make a delay in an indicator, if Sleep function doesn't work there?

Artyom Trishkin:
I wrote "potential". It means that you will have to look for it again. You'd better go straight to it.
This is just an example and it's not about memory leaks. In my indicator, it's set up differently.
 
Mihail Matkovskij:

I have to redo all algorithms of naming objects in my indicator. And there is quite a lot of code, believe me.

Maybe, there is some other way. For example, first call ObjectDelete for all objects and then, after a delay, call ObjectFind. And again delete those objects that are not deleted. And so until their number is 0. How can we make a delay in an indicator if the Sleep function does not work there?

This is a very good approach. I tediously change everything, let the developers tediously change everything. Who prevents you from checking it on your own example and announcing the result? You do not even want to do this, "Let them try. I'd rather wait...". © V.Vysotsky.

 
Alexey Viktorov:

That's a very good approach. I don't need to change everything, let the developers change everything. Who is stopping you from testing your own example and reporting the results? You don't even want to do that, "Let them try it. I'd rather wait...". © V.Vysotsky.

I did not say that the developers would do something for me! The algorithm of naming objects is just not designed for calling the ObjectDeledeAll function later. It's only in the example of simple naming "trend".

 
Mihail Matkovskij:

I didn't say that so the developers would do something for me!

Not explicitly, but the message about a non-existent bug reads like that.

 
Alexey Viktorov:

Not explicitly said, but the message about the non-existent bug reads that way.

What other bug? Rashid Umarov explained everything and I understood him. Only you have not understood what is written here in the messages for some reason. :)

 
Mihail Matkovskij:

What other bug?

This one.

Mihail Matkovskij:

Made a source code where this bug occurs:

 
Alexey Viktorov:

About that

Don't you have anything else to do on this forum, Alexey, other than twisting my posts to make them look like claims to the developers on my behalf...? I wonder what was the reason for such strange "enthusiasm" on your part? You'd rather help newbies with their questions in the appropriate threads, than do nonsense here...!