学习Obj-C内存管理 [英] Learn Obj-C Memory Management

查看:176
本文介绍了学习Obj-C内存管理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

我来自web开发背景。我擅长XHTML,CSS,JavaScript,PHP和MySQL,因为我在日常工作中使用所有这些技术。

I come from a web development background. I'm good at XHTML, CSS, JavaScript, PHP and MySQL, because I use all of those technologies at my day job.

最近我一直在修补Obj -C在Xcode在晚上和周末。我已经为iPhone和Mac OS X编写代码,但我不能围绕内存管理的实用性。我理解高层概念,但不清楚如何实施。 Web开发人员通常不必担心这些事情,所以这对我来说是新的。

Recently I've been tinkering with Obj-C in Xcode in the evenings and on weekends. I've written code for both the iPhone and Mac OS X, but I can't wrap my head around the practicalities of memory management. I understand the high-level concepts but am unclear how that plays out in implementation. Web developers typically don't have to worry about these sorts of things, so it is pretty new to me.

我已经尝试为我的项目添加内存管理,但是事情通常最终崩溃。任何建议如何学习?

I've tried adding memory management to my projects, but things usually end up crashing. Any suggestions of how to learn? Any suggestions are appreciated.

推荐答案

除了链接到的arul官方苹果资源之外,这里还有一些其他好的阅读主题:


抱住我,用我,释放我


CocoaDev.com的内存管理部分



并帮助调试内存管理问题:


NSZombieEnabled

On top of the official Apple resources listed in the post arul linked to, here are some other good reads on the topic:

Hold me, use me, free me
CocoaDev.com 's Memory Management Section

And for help debugging memory management problems:
NSZombieEnabled

这篇关于学习Obj-C内存管理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆