What is the cost of using autorelease in Cocoa?

前端 未结 11 1543
眼角桃花
眼角桃花 2020-11-30 08:19

Most of Apples documentation seems to avoid using autoreleased objects especially when creating gui views, but I want to know what the cost of using autoreleased objects is?

11条回答
  •  北海茫月
    2020-11-30 08:49

    Others have answered whether you should autorelease, but when you must autorelease, drain early and drain often: http://www.mikeash.com/?page=pyblog/autorelease-is-fast.html

提交回复
热议问题