Is Objective-C on Linux garbage collected?

2019-07-06 10:46发布

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?

2条回答
贼婆χ
2楼-- · 2019-07-06 11:19

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.

查看更多
Root(大扎)
3楼-- · 2019-07-06 11:41

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.

查看更多
登录 后发表回答