Objective-C implementation of singleton_class