Is garbage collection used in production quality Cocoa apps?

后端 未结 5 1647
有刺的猬
有刺的猬 2021-02-06 09:34

I\'m mainly wondering about the affect that garbage collection would have on performance. Is the use of garbage collection frowned upon for release apps?

Another concern

5条回答
  •  别那么骄傲
    2021-02-06 10:12

    Garbage collection is recommended for any new Cocoa applications, and Apple eats its own dog food by using it in Xcode. Performance is an interesting situation, because while you're most likely going to be consuming more CPU cycles overall, the application may actually end up faster in some areas due to multithreading of the collector and the simplification of accessor methods.

    Computers are made to do work for us. Cocoa's reference counting is usually easy to manage, but garbage collection is one more thing it can do now--let the machine do the work so you can focus on things that matter!

提交回复
热议问题