NSMutableArray- removeObject results with removing object and a nil element
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Firstly, I am new with Objective C. I have my class Song that has a pair of attributes. In my main class i got a variable allSongs that is a NSMutableArray and in this array have I added all my song-objects. My problem comes when trying to call [self.allSongs removeObject:OBJECT]; Using the debugger, I can see that before the call, the list looks as expected. But after the call it will result that the targeted object will be removed but also the first element in the array will turn to nil. Is this a common pointer problem or what? Here is my