Hi Guys,
These are setter and getters.
-(NSMutableArray*)contactList
{
return contactList;
}
-(void)setContactList:(NSMutableArray*) aContactList
{
[contactList release];
contactList=aContactList; //its working fine but leaks
// contactList=[aContactList copy];
// If I keep like this getting exception as mutating
// object setting to immutable but it is mutable only.
}
In view controller, in edit funtionality, I am adding new object to the list like this
[tempDetailsObj.contactList addObject:editcontacts];
here I am getting exception as mutating
object setting to immutable but it is mutable only.
If I remove copy its working fine but I am getting Leak, So I want to add the object to the list without any exception and it should not produce any leaks.
Please Help me out of this problem