I have used the following code :
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
if (theConnection)
{
responseData = [[NSMutableData data] retain];
}
in viewDidLoad method. But, I get a memory leak error on :
responseData = [[NSMutableData data] retain];
How do I release theConnection?
receiveData is a class member,so I think release it in viewDidUnload is OK.