How to calculate total size of NSDictionary
object?
i have 3000 StudentClass objects in NSDictionary
with different keys. And i want to calculate total
You could try to get all the keys of the Dictionary in an array and then iterate the array to find the size, it might give you the total size of the keys inside the dictionary.
NSArray *keysArray = [yourDictionary allValues];
id obj = nil;
int totalSize = 0;
for(obj in keysArray)
{
totalSize += malloc_size(obj);
}