I have a NSMutableString var, which I have also synthesized.
This gets set in viewDidLoad
NSLog(@"Var val is %@@",curr_rep_date);
I have a button on which i call an IBAction and am trying to access the var value inside this method.
-(IBAction) moreDetails{
NSLog(@"INSIDE IBACTION var val is %@",curr_rep_date);
}
But for some reason, the app crashes (Program received signal: “EXC_BAD_ACCESS”.)
Please help me fix the issue,
You’re probably storing an object you don’t own in an instance variable, so when you try to get at it again later, it’s gone because it didn’t know you needed it.
The memory management guide offers a simple set of rules you need to follow to get this right.