I am passing the _resultArray object which is in connectionDidFinishLoading using delegate from one class to another class through this delegate method.I am releasing in dealloc but i am not sure that it is ok.How to release this _resultArray..
Here is my code..
-(void)connectionDidFinishLoading:(NSURLConnection *)connection{
NSString *urlDataString = [[NSString alloc]initWithData:receiveData
encoding:NSUTF8StringEncoding];
NSMutableDictionary *soapDictionary = nil;
soapDictionary = [parser objectWithString:urlDataString error:&error];
resultArray = [soapDictionary copy];
[urlDataString release];
[self soapResultSurvey:resultArray];
}
//Delegate Method
-(void)soapResultSurvey:(id)_resultSurvey{
[delegate soapResultSurvey:_resultSurvey];
}
then remember that resultArray will be deallocated later at the end of the thread, so if your delegate need to retain it, well, do it there, in your delegate soapResultSurvey: method