I ran the ‘Analyze’ on my code and the result shows a potential memory leak on the following part of my code
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
//Potential memory leak in code below
[[NSURLConnection alloc] initWithRequest:request delegate:self];
I am not sure how to stop this leak. I tried to add a ‘autorelease’ to the back but that caused a crash. Any advise on this?
EDIT:
Screenshot of the leak message

Your call to alloc on NSURLConnection is returning an object with a reference count of 1. Your code should be as following:
After you are done with the object, you need to explicitly call: