Object size in memory

 

Hi  Is there a function to call and witch one will return the size of referred object in memory. My  software has cash and I 'd like to limit it  .if this cash  is bigger then size then delete the oldest objects ()

example   ..if we do not delete created object by new operator then in expert tab we can see how much memory was leaked and by what  ...can we have a similar thing but during running program ??


Regards and ThankYou

 
Marcin Rutkowski: function to call and witch one will return the size of referred object in memory. My  software has cash and I 'd like to limit it  .if this cash  is bigger then size then delete the oldest objects ()
  1. witch Witch

  2. cash Cash

  3. There is no function which returns sizes of objects. They're probably all the same size any way (a structure.)
  4. You could just limit your cache to some maximum count. But a million is still noise.
 

Thank You for replying and spelling was never my strong suit even with basics words :)   ....my objects are very significantly in size and I was hoping to  be fancier and store the size of the object in the object itself but now I know this is not a case but another but   ...I was trying to find a function with can return the total size of the ea in memory but(another :))   I'm not able to find it   ...I know is there because I was using it once but now I do not remember the word it was something like  SomethingInfo(param, para, ENUM_SHOW_ME_THE_MEMORY_SIZE)  but first you need a keyword to type into google :)  ...If You remember what was that it would be great

Thank You again and Regards :)

 
William Roeder:
  1. witch

  2. cash

  3. There is no function which returns sizes of objects. They're probably all the same size any way (a structure.)
  4. You could just limit your cache to some maximum count. But a million is still noise.

I finally found it: TerminalInfoInteger(TERMINAL_MEMORY_USED)  ...not ideal but better than nothing :)  

Regards