Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

里面提到的“关注对象包涵关系“部分 #2

Open
skywalkerlw opened this issue Mar 15, 2013 · 0 comments
Open

里面提到的“关注对象包涵关系“部分 #2

skywalkerlw opened this issue Mar 15, 2013 · 0 comments

Comments

@skywalkerlw
Copy link

里面提到了“摧毁对象释放空间的时候往往对象之间包涵关系,例如:一个NSArray对象A,有2个元素,B对象和C对象。当对摧毁A的时候,首先应该做一个操作,移除A中的全部元素([A removeAllObjects];),在调用release方法”

NSSArray 的dealloc方法的实现里面 必须已经考虑到 释放他的objects了 ,所以应该不需要做removeAllObjects操作了吧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant