开发者

Releasing statically allocated nsarray

I have a s开发者_运维知识库tatic array in my class. When do i release it? or I don't have to worry about it? I was thinking about releasing it in dealloc method but not sure. Thanks


If it's static, you shouldn't release it.


If you are concerned about the amount of memory the array takes up (because it's potentially large and is something that you can always recreate if needed), you can empty the array upon receiving a didReceiveMemoryWarning notification. Otherwise there's really no reason to care too much about it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜