From 1507eb202cf007c7788d220a1f319d88b8709d6b Mon Sep 17 00:00:00 2001 From: dmaclach Date: Sun, 11 Nov 2018 10:46:01 -0800 Subject: Remove unused GTMObjectSingleton.h (#183) --- Foundation/GTMObjectSingleton.h | 64 ----------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 Foundation/GTMObjectSingleton.h (limited to 'Foundation') diff --git a/Foundation/GTMObjectSingleton.h b/Foundation/GTMObjectSingleton.h deleted file mode 100644 index 0932652..0000000 --- a/Foundation/GTMObjectSingleton.h +++ /dev/null @@ -1,64 +0,0 @@ -// -// GTMObjectSingleton.h -// Macro to implement a creation method for a singleton -// -// Copyright 2005-2008 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy -// of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. -// - -// -// This file has been kept around for compatibility with apps relying on its macro, -// but given how simple this is, there is not a compelling reason for any app to -// use this macro. -// -// For a reasonable discussion of Objective-C singletons, see -// http://eschatologist.net/blog/?p=178 -// -// Sample usage: -// -// GTMOBJECT_SINGLETON_BOILERPLATE(SomeUsefulManager, sharedSomeUsefulManager) -// (with no trailing semicolon) -// - -#include - -#if (defined(__IPHONE_7_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0)) \ - || (defined(MAC_OS_X_VERSION_10_9) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9)) -#error "GTMOBJECT_SINGLETON_BOILERPLATE is deprecated; change this in your sources to a class method using dispatch_once." -#endif - -#if NS_BLOCKS_AVAILABLE - -#define GTMOBJECT_SINGLETON_BOILERPLATE(_object_name_, _shared_obj_name_) \ -+ (_object_name_ *)_shared_obj_name_ { \ - static _object_name_ *obj; \ - static dispatch_once_t onceToken; \ - dispatch_once(&onceToken, ^{ \ - obj = [[self alloc] init]; \ - }); \ - return obj; \ -} - -#else - -#define GTMOBJECT_SINGLETON_BOILERPLATE(_object_name_, _shared_obj_name_) \ -+ (_object_name_ *)_shared_obj_name_ { \ - static _object_name_ *obj; \ - if (obj == nil) { \ - obj = [[self alloc] init]; \ - } \ - return obj; \ -} - -#endif // NS_BLOCKS_AVAILABLE -- cgit v1.2.3