I've been debugging some memory leaks. My understanding of Objective-C memory handling is, even now, flaky at best and this is not helped by retain count rules that include words like "generally" and "automatically" - in short I have no idea what the hell is going on.
What I want is to set the debugger to break on a retain and break on a release so I can see who or what is adding to the retain count. However, while you can set the debugger to break on a particular Objective-c invocation (such as setting a breakpoint on '-[NSException raise]' to effect a "break on exception"), doing this for a specific class is not possible.
Then I had this brainwave - just override the base class implementation by chucking the following into the .m file (no need to muck about with the headers):
...then set a breakpoint on whichever you want. Tadaa! Instance traceability of reference counts! It also acts as a just astounding way of learning what does and does not change the reference counts...
Previous next big things include development of the capture and intermediate compression technology in iShowU-HD; design and implementation of a small advertising network; the refinancing, technical direction, and a lot of the donkey work for Virtual Katy; technical direction, project management and (again) donkey work for VoiceQ; creating code and intellectual property around load balancing that was acquired by Allied Telesis; and the research and an implementation of the h.264 video compression protocol.