Triggered by Mike Ash’s newest article “Dangerous Cocoa Calls” from his great Friday Q&A series, I want to know which are the things in Cocoa that made your code stumble. Mike has compiled a great list of evil API uses that are mostly about thread and exception safety. I’m sure that there are more hidden pitfalls that Cocoa programmers should be aware of.
To make it clear: I’m not looking for obvious programming errors, like not retaining an instance variable or sending unknown selectors to objects. I’m looking for recurring patterns that do not do what is expected. I want to find the parts of the Cocoa API where usage seems to be clear but has hidden traps.