tags:

views:

176

answers:

1

I know you can't use GC in iPhone applications cause iPhone does not have enough resources to enable that - it would kill the performence.

What about iPad. I know they run iPhone OS too, does that mean that CG can't be enabled on the iPad as well?

+5  A: 

There is no Garbage Collected variant of Objective-C in the iPhoneOS. Not even iPad, nor 4.0. Probably Apple doesn't find it important to support it.

KennyTM
I guess Apple wants novices to be totally confused by `retain`'s and `release`'s. You can see how confused people are, judging from the number of questions here at SO.
Yuji
it's probably not a matter of confusing people but more of resource management. It takes processing to figure out which objects are no longer being referenced and ready to be garbage collected. Less processing means more battery life.
Joo Park
@Joo: yes, but (1) GC is not compulsory, Apple can use the non-GC variant in their core apps (e.g. SpringBoard); (2) Javascript (anything that uses UIWebView) already requires a GC and I don't think it's anything less processing than ObjC's GC.
KennyTM