Hi, i'm writing a program which do something like that:
- (void)viewDidLoad {
[super viewDidLoad]; propertyList = [[NSMutableDictionary alloc] init];
for (SensorData* _data in _res) {
AttributeLine* newLine=[[AttributeLine alloc] init:idx];
[propertyList setObject:newLine forKey:[_data textValue]];
[newLine release];
}
}
- (void)dealloc {
[propertyList release];
[super dealloc];
}
It's not complete the code, but there is the logic of what i do. The problem is: when the program arrives to the [propertyList release] instruction, fail with an EXEC_BAD_ADDRESS. If i comment that instruction everything goes fine, but i have memory leaks. Any idea ?
[Edit by bbum: marco said below that his dealloc is correct and the code is still crashing]