Lack of autorelease optimization under ARC compiler

前端 未结 3 1135
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-25 08:00

I was just wondering, why is there no autorelease pool optimization under the ARC compiler, where it would retain an object in the innermost scope, remove it from the autoreleas

3条回答
  •  长情又很酷
    2021-01-25 08:05

    You could probably break the functionality up into multiple calls which would give the code time to breath. Like having a method do x at a time, and when that method returned it would likely release that memory.

提交回复
热议问题