I’ve got a strange issue. This is suddenly started happening in the code that used to work with no problem.
I have a simple code like this:
[[NSUserDefaults standardUserDefaults] setObject:viewControllersList forKey:kViewControllersKey];
[[NSUserDefaults standardUserDefaults] synchronize];
Where I’m saving some info into the UserDefaults (for state preservation).
All of a sudden today on the first line of this code I started receiving
*** -[CFDictionary isNSDictionary__]: message sent to deallocated instance 0x65bc5d0
It happens almost always, but not quite. If I delete the app from the simulator, clean the project and rebuild/run, then it works. If I stop the app and re-start – the error is back.
I’m totally stuck at this. Any ideas?
You ar trying to add a
NSDictionary(viewControllersList) but thisNSDictionaryis already released