Instruments makes app crash when setting image property of UIImageView
I'm having some trouble with Instruments. My app开发者_Python百科 is working perfectly without crashes, but I would like to check for memory leaks with Instruments. Only problem is, Instruments makes the app crash at the same spot every time -- never crashes without Instruments.
I have pin-pointed the exact line which makes the app crash. When I comment it out, the app does not crash.
This is the line that is causing trouble for Instruments:
self.speakerImageView.image = image;
speakerImageView is declared like this:
@property (nonatomic, retain) IBOutlet UIImageView *speakerImageView;
image is a valid UIImage object.
Any thoughts?
Are you using image named? The reasing I'm asking is because using imagenamed causes a crash. Do not use image named and give it another try.
精彩评论