Objective-C autorelease memory management

前端 未结 4 640
粉色の甜心
粉色の甜心 2021-02-07 11:51

Im trying to understand when to call autorelease, and what this will actually do to my object.

After reading About Memory Management in the Mac Developer Library I under

4条回答
  •  有刺的猬
    2021-02-07 12:26

    The one responsible for creating it and the one who calls runIt has to retain the object. When the one responsible is done with it, it should then release the object.

提交回复
热议问题