It seems pretty clear that it is supposed to set things up.
- When exactly does it run?
- Why are there two brackets?
- Is
__attribute__
a function? A macro? Syntax? - Does this work in C? C++?
- Does the function it works with need to be static?
- When does
__attribute__((destructor))
run?
__attribute__((constructor))
static void initialize_navigationBarImages() {
navigationBarImages = [[NSMutableDictionary alloc] init];
}
__attribute__((destructor))
static void destroy_navigationBarImages() {
[navigationBarImages release];
}