我通过此委托方法将使用委托的 connectionDidFinishLoading 中的 _resultArray 对象从一个类传递到另一个类。我在 dealloc 中释放,但我不确定它是否可以。如何释放这个 _resultArray ..
这是我的代码..
-(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];
}