When I Product > Analyze
the clang analyzer gives me a memory leak I do not understand. It says that I am leaking in the second line something what was initialized in the first line of the following code
[[testView newScore] setText: [NSString stringWithFormat: @"+%d", addScore]];
[[testView newScore] setTextColor: [UIColor greenColor]];
As Instruments isn't working right now (I am using Xcode 4.1 with SDK 4.3) I can't investigate this leak any further.
Do you see why this could be a memory leak. The property newScore
is defined like this:
@property (nonatomic, retain) UILabel *newScore;
and testView
is a subclass of UIView
.
Edit: Screenshot of the analyzer output:
Thank you for reading!