main
 1//
 2// Licensed under the terms in License.txt
 3//
 4// Copyright 2010 Allen Ding. All rights reserved.
 5//
 6
 7#import "KWAny.h"
 8
 9@implementation KWAny
10
11#pragma mark -
12#pragma mark Initializing
13
14static KWAny *sharedAny = nil;
15
16+ (id)any {
17    if (sharedAny == nil) {
18        sharedAny = [[super allocWithZone:nil] init];
19    }
20
21    return sharedAny;
22}
23
24+ (id)allocWithZone:(NSZone *)zone {
25    return [[self any] retain];
26}
27
28- (id)copyWithZone:(NSZone *)zone {
29    return self;
30}
31
32- (id)retain {
33    return self;
34}
35
36- (NSUInteger)retainCount {
37    return NSUIntegerMax;
38}
39
40- (oneway void)release {
41}
42
43- (id)autorelease {
44    return self;
45}
46
47@end