Or, what is the opposite of +(void)initialize?
Here's my situation:
I have a class Unit, whose -(id)initWithName: function takes data from a global NSDictionary, which is created lazily, defined in the Unit.m file as:
static NSMutableDictionary *unitLibrary = nil;
Where do I call [unitLibrary release]?
You can call it at a location in which you know the dictionary is not needed anymore. If it is needed throughout the entire lifecycle of the application, then you don't have to do anything as all memories will be reclaimed by the OS when the app terminates.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With