I would like to accomplish something like what is being done in this post: http://stackoverflow.com/q/538996/252428
however, i would like to construct an NSDictionary.
if i do something like:
constants.h
extern NSArray *const mFooKeys;
extern NSArray *const mFooObjects;
extern NSDictionary *const mFooDictionary;
constants.m
NSArray *const mFooKeys = [[NSArray alloc] initWithObjects:
@"Foo", @"Bar", @"Baz", nil];
NSArray *const mFooObjects = [[NSArray alloc] initWithObjects:
@"1", @"2", @"3", nil];
NSDictionary *const mFooDictionary = [[NSDictionary alloc] dictionaryWithObjects:mFooObjects
forKeys:mFooKeys];
do i release in dealloc and everything is fine, or is there more to it? this is more a cautious question than a 'something is wrong' question, but i feel like i could really mess this up without realizing it.