I\'m new to Objective-C and can\'t seem to get the memory management code right. I have the following code:
Media* myMedia = [self.myMediaManager getNextMedia];
You can release objects if you new, alloc, copy, mutableCopy or retain them first.
release
new
alloc
copy
mutableCopy
retain
Since there is no alloc/copy/retain in [self.myMediaManager getNextMedia]; you can't release it.
[self.myMediaManager getNextMedia];