iosmemory-managementabaddressbookcncontactstore

Can i keep my Object in memory till application exits?


I am using Native contact to store in NSMutableDictionary. So whenever required i can query any contact from NSMutableDictionary without going to Native API's (ABAdressBookRef, CNContactStore).

My Concern is how long NSMutableDictionary will be available in memory?.


Solution

  • As long as you hold a strong reference to it somewhere. When there are no strong references to it, it will be released.