简体   繁体   中英

NSMutableDictionary in iPhone

After adding the key value pairs in NSMutableDictionary, when i retrive the key/values from it, will that retrived key/value be removed from NSMutableDictionary? or is it stil maintained in NSMutableDictionary?

If you are using objectForkey to retrieve the value, the key/value will stay in the dictionary. If you would like to remove an object for a particular key from the dictionary, you need to use removeObjectForKey .

除非您调用removeObjectForKey或类似的名称,否则它将保留在那里。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM