I am developing an application in which one of the main object store Mutable array of objects...
Code:
@interface MainObject : NSObject {
NSMutableArray *subObject;
}
@property(nonatomic,retain) NSMutableArray * subObject;
Sub Object is as follows
Code:
@interface SubObject : NSObject {
NSMutableArray *finalObject;
NSString *somestring;
}
@property (nonatomic,retain) NSMutableArray * finalObject;
@property (nonatomic,retain) NSString * somestring;
I have a table view and based on selection in there i will fill in the MainObject and when user goes back and do a diffrent selection i query the sql and need to store diffrent object...
I am trying to release it and create a new object and store the new values in the main object....
But it is failing in the dealloc of the SubObject with objc_msgSend error..
When i debugged i found that the as soon as the finalObject in the SubObject Class is released its other member somestring is also getting released....Although the address for the two are not the same.
Can someone plz help me to resolve this...
Thanks in Advance
Santhosh