Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 NSMutableDictionary 中添加键值对后,当我从中检索键/值时,是否会从 NSMutableDictionary 中删除检索到的键/值?还是仍然在 NSMutableDictionary 中维护?
如果您使用objectForkey检索值,则键/值将保留在字典中。如果您想从字典中删除特定键的对象,则需要使用removeObjectForKey。
除非您调用 removeObjectForKey 或类似方法,否则它会保留在那里。