Objective-C Memory Management: crash on release
问题 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]; self.navigationItem.title = [self.myMediaManager getCategory]; [self.btnImage setImage:myMedia.imageFile forState: UIControlStateNormal]; [self.lblImage setText:myMedia.imageLabel]; //[myMedia release]; My app crashes if I uncomment the above line. Do I need to do something special when I instantiate myMedia? EDIT: If myMediaManager is