I have been having some problems with some variables inside a class being deleted lately. Here is how I declare:
MyClass *myClass;
-(void)viewDidLoad {
myClass = [MyClass new];
//something using my class
then when I call a function later that uses an array and a dictionary inside the class.
[myClass doSomething];
Here is the code I get in the console.
-[CFArray objectAtIndex:]: message sent to deallocated instance 0x5d1f370
Here is how I declare the area in the Class
NSArray *myArray;
-(void)doSomething{
myArray = [NSArray array];
Then later I just perform a valid objectAtIndex on the array. Someone please help me.