CArrayObj.Reserve(n) help!

 

I'm trying to reserve n elements in CArrayObj and it seems to be missing a routine for setting the m_data_total variable to the number of elements reserved. When you .Reserve(n) it will allocate the elements in memory but using the .Total() returns 0;

Is this a bug or a feature?


#include <Arrays\ArrayObj.mqh>
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   CArrayObj arr;
   int elements = 100;
   bool res = arr.Reserve(elements);
   
   Print("Reserving ",elements," elements returned ",res,
         " and the Total() function is returning ",
         arr.Total()," elements."
         );

Result : "Reserving 100 elements returned true and the Total() function is returning 0 elements."

 
It serves the same purpose as the second parameter of ArrayResize(). Memory is allocated but not reflected in ArraySize().