views:

515

answers:

3

Objective-C v2.0 (which is what the mac uses) got a new feature, Garbage Collection. I'm a kid on a Linux PC (Ubuntu in case your wondering). So my question is, using the gcc/g++ compiler is Objective-C Garbage Collected?

+1  A: 

No, garbage collection for Objective-C is only available on Macs; it hasn't been added to the GNU version of the language.

mipadi
I keep getting downvotes for this periodically; I'd be happy to delete the answer if the OP would kindly accept the correct answer below.
mipadi
+2  A: 

If you are refereing to Gnustep Objective-C. I think you have to build gnustep with gc enabled and linked to some gc library. But if you do apt-get install it comes built like that.

Vasil
+7  A: 

Replies above are wrong. Garbage collection has been a part of gcc's implementation of Objective-C since at least gcc 2.95. The most recent version is gcc 4.4.1.

naasking