NSMutableArray destruction

前端 未结 5 2052
广开言路
广开言路 2021-02-02 16:48

I have an array NSMutableArray with happy objects. These objects viciously turn on (leak) me whenever I try to clear the array of all the objects and repopulate it.

5条回答
  •  借酒劲吻你
    2021-02-02 16:57

    what does your @property declaration look like? are you synthesizing the accessors? If so, you need @property(retain). I'm assuming that when you say the objects are turning on you, you're referring to a core dump (EXC\_BAD\_ACCESS).

提交回复
热议问题