MetaTrader 4 Build 574 with Updated MQL4 Language and Market of Applications Released - page 4

 
gchrmt4:


Confirmed by Service Desk. They say "Please look through Scripts\PeriodConverter.mq4 script in order to understand new format"

Format of HST files has changed; RateInfo structure is/was same as HST files; therefore RateInfo structure has changed; therefore existing DLLs using data from ArrayCopyRates() are broken. Including the DLLSample from MetaQuotes.

Maybe I'm misunderstanding . . . MetaQuotes CEO said . . . "old ex4/mq4 files will work, " if the .hst format has changed how can this statement be true ?
 
Just above RaptorUK:'s first post it says
ArrayCopyRates() performs virtual copying to double[][6] array ArrayCopyRates() performs virtual copying to MqlRates[] array. Copying to double[][6] array has remained intact for the sake of compatibility, however, that copying is real, not virtual

History files have changed so reading history is broken. If you use ACR to DLL that should still work as the MqlRates[] array will be copy/converted to a double[][6] so old files should work.

The only thing I'm not sure about is, does the statement imply that ACR() must me called each tick for the copy/conversion?

 
angevoyageur:
Can you, please, explain where you see that a boolean creates a memory leak of 4 bytes and where in the help you can read "1 byte" ?

1. Actually I realized I was not correct. Boolean consumes really 1 byte, but the leak of the object appears in 4-byte increments.

2. It is in the link you provided: https://www.mql5.com/en/docs/basis/types/integer

 
Ovo:

1. Actually I realized I was not correct. Boolean consumes really 1 byte, but the leak of the object appears in 4-byte increments.

2. It is in the link you provided: https://www.mql5.com/en/docs/basis/types/integer

Thank you. Anyway, there is no "memory leak" at all, as memory is managed and cleaned by MT4 automatically.
 

Erroneous execution of a simple indicator showing the price.

The price disappears when changing Timeframe
Files:
 
Alabarce:

Erroneous execution of a simple indicator showing the price.

The price disappears when changing Timeframe

Variable pprice isn't explicitly initialized, change this :

double pprice;

with this

double pprice=0.0;
 
angevoyageur: Thank you. Anyway, there is no "memory leak" at all, as memory is managed and cleaned by MT4 automatically.

I hope everyone understands that I do-know about the delete command. I was intentionally trying to create the memory leak so that I could see the Log message. I did-not classify it as a Bug | Suggestion. I said if MetaQuotes is still interested in Bugs and Suggestion because I didn't know what to classify it as. Again .. my concern is that Currently ... mt4 does-not say which Class the memory leak is being generated from (at the time my script was run). This question might keep coming up within the forum ... and I think it'll be a helpful tool for the programmer to know. If the error message is pointless ... then why display it within the logs to begin with.

Anyways to your above comment. I was aware of this before I performed my Memory_Leak test.

Edit: (Other questions removed) I'm using an out-dated version of the mql5.chm docs. The on-line docs are closer to mt4 version.

Is there really NO memory-leak ... meaning a program could never crash due to Memory Leak?

 

ubzen:

...

My question to you ... if you have the answers is the following.

Is my interpretations of the above documents correct?

Does mt4 and mt5 clean out their memory leak in the same manner?

Is there really NO memory-leak ... meaning a program could never crash due to Memory Leak?

I can only give you my opinion, as it's more a question for someone of Metaquotes (is mt4 and mt5 are working the same regarding this issue ?).

As I understand, a mql4/mql5 program can never crash due to memory leak. Unless there is a bug in MT4/MT5 platform itself. If memory is released during the program unloading or after the end of events handler function is depending of the scope of the pointer, if it's global or local.

 
angevoyageur:

I can only give you my opinion, as it's more a question for someone of Metaquotes (is mt4 and mt5 are working the same regarding this issue ?).

As I understand, a mql4/mql5 program can never crash due to memory leak. Unless there is a bug in MT4/MT5 platform itself. If memory is released during the program unloading or after the end of events handler function is depending of the scope of the pointer, if it's global or local.

Ok. As always.... Thank you for your opinions.
 
angevoyageur:

I can only give you my opinion, as it's more a question for someone of Metaquotes (is mt4 and mt5 are working the same regarding this issue ?).

As I understand, a mql4/mql5 program can never crash due to memory leak. Unless there is a bug in MT4/MT5 platform itself. If memory is released during the program unloading or after the end of events handler function is depending of the scope of the pointer, if it's global or local.


It should not depend on a scope of a pointer, but on a number of references to the object. The object may be removed only if there is not any reference left. And it is not so easy, there may be deadly embrace, or circular references, so the memory manager must detect garbage with a kinda intelligence.
Reason: