Skip to content

Commit f022373

Browse files
authored
Merge pull request Tencent#61 from reactxp/master
rename 'W(w)hiteList' to 'W(w)hitelist'
2 parents 76e40f4 + da30d9f commit f022373

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

MLeaksFinder/NSObject+MemoryLeak.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
- (NSArray *)viewStack;
2222

23-
+ (void)addClassNamesToWhiteList:(NSArray *)classNames;
23+
+ (void)addClassNamesToWhitelist:(NSArray *)classNames;
2424

2525
+ (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL;
2626

MLeaksFinder/NSObject+MemoryLeak.m

+9-9
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ @implementation NSObject (MemoryLeak)
2424

2525
- (BOOL)willDealloc {
2626
NSString *className = NSStringFromClass([self class]);
27-
if ([[NSObject classNamesWhiteList] containsObject:className])
27+
if ([[NSObject classNamesWhitelist] containsObject:className])
2828
return NO;
2929

3030
NSNumber *senderPtr = objc_getAssociatedObject([UIApplication sharedApplication], kLatestSenderKey);
@@ -142,12 +142,12 @@ + (void)swizzleSEL:(SEL)originalSEL withSEL:(SEL)swizzledSEL {
142142
#endif
143143
}
144144

145-
+ (NSMutableSet *)classNamesWhiteList
145+
+ (NSMutableSet *)classNamesWhitelist
146146
{
147-
static NSMutableSet *whiteList = nil;
147+
static NSMutableSet *whitelist = nil;
148148

149-
if (!whiteList) {
150-
whiteList = [NSMutableSet setWithObjects:
149+
if (!whitelist) {
150+
whitelist = [NSMutableSet setWithObjects:
151151
@"UIFieldEditor", // UIAlertControllerTextField
152152
@"UINavigationBar",
153153
@"_UIAlertControllerActionView",
@@ -157,16 +157,16 @@ + (NSMutableSet *)classNamesWhiteList
157157
// System's bug since iOS 10 and not fixed yet up to this ci.
158158
NSString *systemVersion = [UIDevice currentDevice].systemVersion;
159159
if ([systemVersion compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
160-
[whiteList addObject:@"UISwitch"];
160+
[whitelist addObject:@"UISwitch"];
161161
}
162162
}
163163

164-
return whiteList;
164+
return whitelist;
165165
}
166166

167-
+ (void)addClassNamesToWhiteList:(NSArray *)classNames
167+
+ (void)addClassNamesToWhitelist:(NSArray *)classNames
168168
{
169-
[[self classNamesWhiteList] addObjectsFromArray:classNames];
169+
[[self classNamesWhitelist] addObjectsFromArray:classNames];
170170
}
171171

172172
@end

0 commit comments

Comments
 (0)