You can use libdispatch / Grand Central Dispatch, to execute a block that must run once, and only once, no matter how many threads are knocking at its door.+ (void) initialize { static dispatch_once_t init_predicate; dispatch_once (&init_predicate, ^{ CGColorSpaceRef rgbSpace = CGColorSpaceCreateDeviceRGB (); for (int i = 0; i < 7; i++) { CGFloat components[] = { rawZoneColors[i]._red, rawZoneColors[i]._green, rawZoneColors[i]._blue, rawZoneColors[i]._alpha }; zoneColors[i] = CGColorCreate (rgbSpace, components); } }); } // initialize