Reputation:
I seem to be getting a memory leak when getting the album artwork for the currently playing item with this code:
MPMediaItem *playingItem = self.musicPlayer.nowPlayingItem;
MPMediaItemArtwork *artwork = [playingItem valueForProperty:MPMediaItemPropertyArtwork];
I have tried [artwork release]; even though I didn't alloc artwork but I am still getting a leak. Any Ideas?
Thanks.
Upvotes: 1
Views: 717
Reputation:
I'm fairly certain that the MPMediaItemArtwork is causing the leak. Instruments listed the leaked objects as MPMediaItemArtwork and MPMediaItemArtworkInternal.
For what it's worth, [artwork release] seems to decrease the leaking and removing the artwork code completely kills the leak.
Upvotes: 1