Search code examples
iphoneiosxcodememorydynamic-memory-allocation

How to add and use "ObjectAlloc" and "MallocDebug" in the instrument tool


I am trying to know memory allocated to each view in my App.I am doing it via instruments provided in Xcode.

When i am using instrument in xcode then i am able to see the Tools for leaks and allocation but i am unable to see "ObjectAlloc" and "MallocDebug" tools.

I searched this in the instrument library but it was not showing in the list.

So how to use that tool..

is there any better tool to know memory at each step in my app

Thanks and regards


Solution

  • These are older standalone apps that you seek, formerly distributed with Xcode.

    ObjectAlloc: search "Allocations" in Instruments' Library.

    MallocDebug: Generally, you'll just set these variables in Xcode's Product Scheme Editor, at Run PRODUCT > Diagnostics > Memory Management.

    Options can be found here.