As an alternative, you can control what portions of the running application are measured by setting the global variable NSKeepAllocationStatistics to YES when you want to gather statistics and NO when you do not. This variable is defined in the Foundation Framework file NSDebug.h.
After you have gathered statistics, you run the AnalyzeAllocation command to analyze them. AnalyzeAllocation with no options prints a table that summarizes the allocation statistics. For each class, the table provides the following information:
The -v option prints a detailed analysis for each class, consisting of:
The number of objects allocated
The number of objects deallocated
Shortest lifetime (in seconds) of any object of this class
Median lifetime (in seconds) of any object of this class
Maximum lifetime (in seconds) of any object of this class
Number of ephemeral objects, objects that lasted less than 0.01 seconds
Minimum number of retains on any object of this class
Median number of retains on all objects of this class
Maximum number of retains on any object of this class
Minimum number of releases on any object of this class
Median number of releases on all objects of this class
Maximum number of releases on any object of this class
Minimum number of invocations of an override of retain for any object of this class
Median number of invocations of an override of retain on all objects
Maximum number of invocations of an override of retain on any object
Minimum number of invocations of an override of release on any object
Median number of invocations of an override of release on all objects
Maximum number of invocations of an override of release on any object
Minimum number of autoreleases on any object
Median number of autoreleases on all objects
Maximum number of autoreleases on any object
Minimum number of copies on any object
Median number of copies on all objects
Maximum number of copies on any object
Minimum number of retains on any instance of this class
Median number of retains on all objects
Maximum number of retains on any object