I wrote a small app to see the command line tool leaks in action. The app,
Leak Study
3.zip>, waits 15 seconds, then sets up a repetitive timer to leak 1M every 10 seconds. When I run leaks after each allocation, leaks shows 2 leaks that
appear to belong to Cocoa (see the stack trace), but does not show the 1M
leak allocated by my app. Leaks does show the allocation for the app
increased by a megabyte for each timer event.
The attached sample is after several allocations and should show each of
those allocations as a 1 megabyte leak. The sample only shows the 2 leaks
that occurred at launch.
While checking the archives, I saw a reference to a bug with dead-code
stripping that affected the leaks tool, and another reference to zero-link.
For what its worth, I rebuilt the app with dead-code stripping and zero-link
disabled which gave the same results.
Why is leaks not detecting my 1 megabyte allocation as a leak? What am I
missing?