I want to use a static NSMutableDictionary. Can you help how to use static NSMutableDictionary in a class.
Is it correct? .h file
+(NSMutableDictionary*)contactsToAssignBill; +(void)setContactsToAssignBill:(NSMutableDictionary*)value;
.m file
static NSMutableDictionary * contactsToAssignBill; +(NSMutableDictionary*)contactsToAssignBill { if (!contactsToAssignBill) contactsToAssignBill = [[NSMutableDictionary alloc] init]; return contactsToAssignBill; } +(void)setContactsToAssignBill:(NSMutableDictionary *)value { if(contactsToAssignBill != value) { [contactsToAssignBill release]; contactsToAssignBill = [value mutableCopy]; } }
source share