forum

Home / DeveloperSection / Forums / NSMutableArray destruction

NSMutableArray destruction

Anonymous User155823-Aug-2015

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. 

It's allocated in the init function like so 

self.list = [NSMutableArray array];

The different methods I have used to clear it out include:

self.list = nil;

self.list = [NSMutableArray array];

and

[self.eventList removeAllObjects];

Explicitly allocating and releasing the array doesn't work either. The leak ONLY occurs when I try to reset the list.

Am I missing a step when resetting or is this a different problem?


Updated on 24-Aug-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By