Can a struct become deallocated?
- by brettr
I've declared a struct in my header file like this:
typedef struct {
NSString *department;
NSString *departmentId;
} Department;
Department currentDepartment;
This struct is in a fairly simple class. I assign the struct values in viewDidLoad. Just before leaving viewDidLoad, I see the struct values are still there. After the user clicks a segment control, I reassign the struct values. Before assigning values, I see the two struct values are 0x0. I do have NSZombieEnabled, which is printing out this when I mouse over the struct while the app is running and one of my breakpoints have been hit:
MyApp[25722:207] *** -[CFString _cfTypeID]: message sent to deallocated instance 0xfc0e90
I'm not creating an instance of the struct or deallocating it. How can it be getting deallocated?