开发者

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜