Alex Rivera | Logout

Avoiding, finding and removing memory leaks in Cocoa

Asked 2008-10-05T15:15:40.333
19

Memory (and resource) leaks happen. How do you make sure they don't?

What tips & techniques would you suggest to help avoid creating memory leaks in first place?

Once you have an application that is leaking how do you track down the source of leaks?

(Oh and please avoid the "just use GC" answer. Until the iPhone supports GC this isn't a valid answer, and even then - it is possible to leak resources and memory on GC)

Edit
Report

1 Answer

2

I remember using a tool by Omni a while back when I was trying to track down some memory leaks that would show all retain/release/autorelease calls on an object. I think it showed stack traces for the allocation as well as all retains and releases on the object.

http://www.omnigroup.com/developer/omniobjectmeter/

answered 2008-10-05T16:20:01.953

Your Answer