Search code examples
iosmemory-managementxcode-instruments

Allocation Instruments for iOS: compare memory of two snapshots


In my situation I continuously enter one scene, than exit and so on... So Live bytes amount must be the same while reentering the scene, but it grows up by 3Mb on each enter.

I want to find memory that remains from previous scene. Memory Leak instrument shows no leaks. How can I compare two "snapshots" of memory to highlight differences in allocations?

Previous scene snapshot: enter image description here

After reentering: enter image description here


Solution

  • approach it using Heapshot Analysis

    Here's a great blog entry by bbum: When is a Leak not a Leak? Using Heapshot Analysis to Find Undesirable Memory Growth