在我自己的类中重写保留和释放方法
我想重写类 MapsLocationView 中的保留和释放方法,以便了解我在哪里获得额外的释放。请帮助我以正确的方式做
I want to override a retain and release methods in my class MapsLocationView in order to understand where i'm getting an extra release. Please help me do it in proper way
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这只是做你在 Objective-C 中其他地方所做的事情的一个例子。
It's just a case of doing what you do everywhere else in Objective-C.
对我来说,进行释放保留调查的最佳方法是:
我还发现,如果您用鼠标右键单击该方法,您可以跳转到其定义:)
The best way to do release-retain investigation for me was:
I also found that if you click on the method by right mouse button you can jump to its definition :)
这不是正确的方法,您应该使用泄漏工具或代码分析器来查找额外释放的来源
this would not be the proper way, you should use the leaks instrument or code analyser to find where the extra release is coming from