开发者

Core data managed object property retention

I seem to be having an issue with my managed objects not releasing memory. I have an NSOperation that downloads new information, saves it to a temp context, then merges it to the main context. All this works well but in the all开发者_StackOverflowocations instrument all the newly created properties stick around in memory after the merge is complete and the entire operation is deallocated. Is there any way to fix this? I've tried to reset both the temp and main contexts and refreshObject:, both don't fix this. Thanks!


Make sure that you create an NSAutoreleasePool first thing in the operations main. Before you return out of main make sure you drain the pool. This includes returns before the end of the method such as inside an if statement.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜