Hi Apple Engineers,
I am encountering an issue where the memory usage reported by the Xcode memory report and the Xcode Instruments memory profiler are not aligned. Specifically:
Xcode Memory Report:
After implementing autoreleasepool,
URLSession
reading a zip file, and moving the task inside DispatchQueue.global().async,
the memory usage goes down from 900MB to 450MB, indicating a potential memory leak.
Xcode Instruments Memory Profiler:
The memory usage goes down from 900MB to 100MB, suggesting that the memory has been properly released and there is no significant memory leak.
Could you please help me understand the discrepancy between these two tools and provide guidance on the appropriate way to interpret the memory usage in my application? Which result I should rely on it?
I would greatly appreciate your insights and expertise on this matter. Thank you in advance for your assistance.