Release a NSMutableArray when using ARC
问题 I'm developing an iOS application using latest SDK and ARC. I have this variable: NSMutableArray* _previewImageBuffer; And this method: - (void)shutdown { [self stop]; _previewImageBuffer = nil; } Is _previewImageBuffer = nil; correct? If I do it, what happens with memory allocated in _previewImageBuffer`? Is this a memory leak? I want to release this object because I need to release the memory used by it. 回答1: What you're doing is exactly right. Nilifying an object instance variable under