Objective-C在iPhone上有垃圾收集器吗? [英] Does Objective-C have garbage collector on the iPhone?

查看:99
本文介绍了Objective-C在iPhone上有垃圾收集器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑为iphone编写一个应用程序。但是我对于Objective-C语言感到困惑。我是否正确地说我必须做我自己的记忆管理? Objective-C是C#和/或Java之类的托管语言吗?

谢谢!

解决方案

托管是一个没有技术含义的营销术语。 iPhone的目标C不是垃圾收集,而是使用保留计数内存管理。所以从某种意义上说,你必须做你自己的内存管理,但它仅限于了解

编辑:我对托管的评论指的是前一版本。评论留在这里,因为我厌倦了看到这个词。


I'm thinking of writing an app for the iphone. But I'm confused in regards to the objective-c language. Am I correct in saying that I have to do my own memory management? Is Objective-C a managed language such as C# and/or Java?

Thank you!

解决方案

"Managed" is a marketing term that has no technical meaning. Objective C for the iPhone is not garbage collected, but uses retain counting memory management. So in some sense, you have to do your own memory management, but it's limited to knowing the Cocoa retain counting methodology.

Edit: My comments on "managed" refer to a previous post version. The comment is left here because I'm tired of seeing the word.

这篇关于Objective-C在iPhone上有垃圾收集器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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