I have a struct SystemStruct *sharedStruct = [SystemStruct sharedSystemStruct]; implemented as a singleton, to share 3 Arrays.
the problem is that when i try to count the array's objects the system crash. es:
This code Crash:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
SystemStruct *SharedStruct = [SystemStruct sharedSystemStruct];
return SharedStruct.path.count;
}
This Code Work:
SystemStruct *SharedStruct = [SystemStruct sharedSystemStruct];
NSLog(@"%d", SharedStruct.path.count);
How can i return the correct array count?