Finding Available Memory in Delphi XE2 for iOS Application

I haven’t had to do this for quite some time, but I think I need to trace a memory leak. I’m using Delphi XE2’s FireMonkey to create an iOS application. Years ago, I would use the TMemoryStatus object to give me feedback as to free memory like so:

  MS: TMemoryStatus;
AString:= Format(‘%12.0n’, [MS.dwAvailPhys]);

In XE2, the TMemoryStatus object appears to be no longer defined in the SysUtils unit that is used for iOS applications and so gives an unidentified error.

My question is how can I similarly query available memory to find out where my leak might be?
Who is Participating?
Hamidreza VakilianConnect With a Mentor Senior iOS DeveloperCommented:
These links are talking about functions which displays the instant RAM usage (but in Xcode):

Notice that even you find the equivalent function on Delphi; It won't help you much to catch those leaks since it's not going to provide any details or trace about the occurring leaks. Instead I suggest you to use Instruments (If it supports delphi projects)
Also check Valgrind a powerful debug tool which is able to find memory leaks.
efzAuthor Commented:
My programming problem ended up not being related to a memory leak, so I didn't test the code suggested by rinfo's link.

Certainly Programmer-x's recommendation is the ticket once things are move to Xcode.

Please accept my sincere thanks for your time and expertise.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.