Reputation: 703
I am getting memory leaks in one of the method which I used in my iOS project. I am not able to find out what is happening as I am new in iOS development.
http://screencast.com/t/y2lOtssY2NjO
Upvotes: 1
Views: 65
Reputation: 4249
The static analyser
is pointing out the leak on UIAlertView
.Initialize the alertView only once.
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:str
.....and so on
Upvotes: 1
Reputation: 107121
You are calling init twice on your alertView. I think that makes the issue.
Change that like:
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:str message:kAlertMessage delegate:self cancelButtonTitle:nil otherButtonTitles:@"Install now", @"Cancel", nil];
Please refer this question : What happens if i call init more than once
Upvotes: 4
Reputation: 6427
You can find via instrument here is tutorial for click here that will tell you or Xcode->product->analyze
Upvotes: 0