I’m trying to optimize my application as much as I can. All I am asking is “NSMutableDictionary after you add an object for a certain key, Does it store the data in the ram memory or the storage memory?” I am using Xcode 4.5.2 with iOS 6.0 Thanks in advance
Share
It’s only storing a pointer — a reference to an object. That pointer is stored in memory. When added,
NSMutableDictionarydoes not do anything special — e.g. message the values to somehow minimize their physical memory consumption.If you want values saved to disk or to support purging, see
NSCache. It may be exactly what you are looking for.Otherwise, you may favor just writing to disk, and storing
NSURLs in the dictionary. Hard to say, not knowing how you are approaching this optimization.