Differences From Artifact [e9bf9ceb4f]:
- File
src/OFAutoreleasePool.m
— part of check-in
[6b77a5dd8b]
at
2017-05-21 21:28:57
on branch trunk
— Prefix private methods with of_ instead of OF_
This matches Apple's style. (user: js, size: 3306) [annotate] [blame] [check-ins using]
To Artifact [ae2a82f384]:
- File
src/OFAutoreleasePool.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 3362) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
44 45 46 47 48 49 50 | if (!of_tlskey_new(&cacheKey)) @throw [OFInitializationFailedException exceptionWithClass: self]; } #endif | | | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | if (!of_tlskey_new(&cacheKey)) @throw [OFInitializationFailedException exceptionWithClass: self]; } #endif + (instancetype)alloc { #if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS) OFAutoreleasePool **cache = of_tlskey_get(cacheKey); #endif if (cache != NULL) { for (size_t i = 0; i < MAX_CACHE_SIZE; i++) { |
︙ | ︙ | |||
83 84 85 86 87 88 89 | [cache[i] of_super_dealloc]; free(cache); cache = NULL; } } | | | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | [cache[i] of_super_dealloc]; free(cache); cache = NULL; } } - (instancetype)init { self = [super init]; @try { _pool = objc_autoreleasePoolPush(); _objc_rootAutorelease(self); |
︙ | ︙ | |||
166 167 168 169 170 171 172 | } } } [super dealloc]; } | | | | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | } } } [super dealloc]; } - (instancetype)retain { OF_UNRECOGNIZED_SELECTOR } - (instancetype)autorelease { OF_UNRECOGNIZED_SELECTOR } @end |