IOS Memory Management and Application Foreground/Background
In my IOS application, I have a NSDate* property that is marked as retain
When My application becomes active again, the properties value has been re开发者_运维百科leased.
Did I misunderstand how properties and memory management work, and how can I guard against this?
Its obvious that something is sending a release or dealloc message somewhere. If I were you I would create a deep copy like:
NSItem *ref = [[NSItem alloc] initWithData: x];
As far as finding out what is happening to that item in question I suggest you use NSZombie as an env variable as step through the call stack to see where its getting released.
Best of luck!
精彩评论