Обратите внимание на следующий код.
XmlManipulatorObject=[[xmlManipulator alloc] init];
self.QuestionMutableArray=[[XmlManipulatorObject ReadXml] init];
self.dictionary=[[NSMutableDictionary alloc]init];
self.dictionary=[QuestionMutableArray objectAtIndex:reloader];
в моем методе dealloc мне нужно освободить все объекты, которые я использую выше. Каким должен быть способ?
Я пробовал со следующим, но имел BAD_ACCESS:
-(void)deallocAll
{
[self.dictionary release];
[self.XmlManipulatorObject release];
[self.QuestionMutableArray release];
}
и свойства, как показано ниже:
@property(nonatomic,retain)NSMutableDictionary *dictionary;
@property(nonatomic,retain)NSMutableArray *QuestionMutableArray;
@property(nonatomic,retain)xmlManipulator *XmlManipulatorObject;