Can we use NSGarbageCollector class for memoer management in iPhone apps? Or is it only for Mac Programming?
As the other poster says, you can't. It is/was Mac OS only. (Thank god).
The garbage collector was a failed experiment. It was too slow for real-world development. It would cause UI "stutters" if the program ran the garbage collector during a critical user activity like drawing a free-form line on the screen.)
ARC is lightning fast and offers many of the same ease-of-use benefits.
About the only thing ARC doesn't handle that the garbage collector did handle is avoiding retain cycles. (If object A has a strong reference to object B, and object B also has a strong reference to object A, they'll never get released unless you clear one of the references. In the garbage collector, objects had to be be referenced by a known location in your program or they would be released, so it would automatically free object A and object B unless you had another strong reference to them somewhere.)