I have allocated object inside the function [Method.]
inside parser method.
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName
namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName
attributes:(NSDictionary *)attributeDict{
Information *aInfo = [[Information alloc] init];
if([elementName isEqualToString:@"data"]){
aInfo.strStoreId = [attributeDict valueForKey:@"storeid"];
[arrayList addObject:aInfo];
} else if ([ActionType isEqualToString:@"action"]) {
if([elementName isEqualToString:@"data"]) {
aInfo.strStoreId = [attributeDict valueForKey:@"storeid"];
[arrayList addObject:aInfo];
}
}
}
How do I manage the memory issue in this case?
[aInfo release];or[aInfo autorelease];at the end of the method