开发者

Automated checking of non-dealloc'd properties in Objective-C

开发者 https://www.devze.com 2023-02-14 11:21 出处:网络
Is there an automa开发者_开发百科ted way to check for properties defined in a class that are not deallocated in the dealloc method that can be built into unit tests? I am hoping to help automate memor

Is there an automa开发者_开发百科ted way to check for properties defined in a class that are not deallocated in the dealloc method that can be built into unit tests? I am hoping to help automate memory management testing, as that seems to be my biggest fault when coding in Objective-C for the iPhone.


I'm not sure if you've tried this or not but there is a 'build and Analyze' option in the Build menu that does a pretty good job of this. I use @property's everywhere and it seemed to pick all of mine up correctly.

I encountered this option by an accidental click and found it to be so valuable!

0

精彩评论

暂无评论...
验证码 换一张
取 消