Does @property(retain) need a release?

前端 未结 3 610
故里飘歌
故里飘歌 2021-01-14 10:42

Below are three fragments of code, the first two are interfaces for two objects along with a couple of @property commands. Please note that this is just me learning, its not

3条回答
  •  无人共我
    2021-01-14 11:28

    If you are targeting Mac OS X, the best answer would be to turn on garbage collection and delete the -dealloc method.

    To answer the specific question, you need to release both name and system in your -dealloc method.

提交回复
热议问题