Using NSCache instead of NSMutable dictionary for reclaimable data

68 views Asked by At

I am using around 25 NSMutableDictionary in my singleton class to hold the data from web services. When I try to access those dictionaries if those dictionaries are nil, service will be invoked and dictionaries will be filled.

My questions are

  1. When my app receives DidReceivedMemoryWarning, Will those dictionaries be released?
  2. If it is not released, can i explicitly set those dictionaries to nil when app receives memory warning message?
  3. Instead of doing step1 and step2, can i use NSCache instead of NSMutableDictionary as NSCache will be released automatically when app receives memory warning?
0

There are 0 answers