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

 
ubzen:

If you guys are still interested in bugs and suggestions, I found one today.

https://www.mql5.com/en/forum/148814.

My simple script below generates a Class location of the Memory-Leak within mt5 but not within mt4.

Interesting is that the boolean creates a leak of 4 bytes while the help reads 1 byte.

 
ubzen:
Thanks. Pressing F1 within Meta-Editor gives me the User Guide. Following the Menu. Help->MQL4 Reference brings up the Mql4 stuff.
Pressing F1 from code in MetaEditor gives you MQL4 reference.
 
ubzen:

If you guys are still interested in bugs and suggestions, I found one today.

https://www.mql5.com/en/forum/148814.

My simple script below generates a Class location of the Memory-Leak within mt5 but not within mt4.

Not sure where you see a bug. I got an error message in Experts tab in both cases.

From documentation (mql5 as there is not yet online doc for mql4) :

All objects created by the expression of object_pointer=new Class_name, must be then deleted by the delete(object_pointer) operator. If for some reasons such a variable is not deleted by the delete operator when the program is completed, the corresponding entry will appear in the "Experts" journal.

 
Ovo:

Interesting is that the boolean creates a leak of 4 bytes while the help reads 1 byte.

The memory leak is for an instance of CLeak, not for a boolean.
 
Renat:
HST format is not documented and only for our service.

Format of RateInfo structure has also changed. All DLLs which receive data from ArrayCopyRates() are now broken and must be replaced, including the DLLSample which has been supplied with MT4 since 2004.
 

I am afraid you did not read it properly.

angevoyageur:
The memory leak is for an instance of CLeak, not for a boolean.

I wrote about boolean, rather than CLeak. The instance of CLeak has 20 bytes altogether.

angevoyageur:

Not sure where you see a bug. I got an error message in Experts tab in both cases.

From documentation (mql5 as there is not yet online doc for mql4) :


He wrote about a class location of the leaked object, rather than how to release the heap.

 
gchrmt4:

Format of RateInfo structure has also changed. All DLLs which receive data from ArrayCopyRates() are now broken and must be replaced, including the DLLSample which has been supplied with MT4 since 2004.

Really ?

Renat :

Do not be fooled that exactly 6 months in our forums repeated "old ex4/mq4 files will work, supported by two copies of virtual machines to maintain compatibility"?

Already at least 10 huge branches was devoted to discussing only upgrade MQL4.

 
Ovo:

I am afraid you did not read it properly.


I wrote about boolean, not CLeak. The instance of CLeak has 20 bytes altogether.

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" ?


He wrote about the class location of the leaked object, not about how to release the heap.

Thanks, understood now.
 
RaptorUK:

Really ?


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.

 
alexvd:

Try to add following line at the end of OnStart function.

So alexvd, from what Ovo brings to my attention, the issue is in the error message reported :

With MT5 :

2014.01.11 11:43:52.085 Test (EURUSD,H1) 1 object of type CLeak left
2014.01.11 11:43:52.085 Test (EURUSD,H1) 1 undeleted objects left

With MT4 :

2014.01.11 11:44:58.053 Test EURUSD,M5: 20 bytes of leaked memory
2014.01.11 11:44:58.053 Test EURUSD,M5: 1 undeleted objects left

No identification of the object type causing the "memory leak".

Reason: