Tools have a command line interface:
$ instruments -h
Usage example:
$ instruments -t mytemplate -a myapp.app
For leaks, try Leaks.tracetemplate . To view all available patterns, use -s .
There is another executable file, simply called leaks . You can check any running application by specifying leaks its PID:
$ ps aux | grep "[b]ash" | awk '{print $2}' 620 $ leaks 620 leaks Report Version: 2.0 Process: bash [620] Path: /bin/bash Load Address: 0x100000000 ... Process 620: 37983 nodes malloced for 1123 KB Process 620: 0 leaks for 0 total leaked bytes.
Learn more about leaks in the Apple Developer Library.
miku Jan 27 '11 at 16:39 2011-01-27 16:39
source share