Reputation: 2421
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?
Upvotes: 0
Views: 135
Reputation: 26
receiveData is a class member,so I think release it in viewDidUnload is OK.
Upvotes: 1