Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

存在5处僵尸对象问题,kvc赋值时候赋值为nil的时候不会崩溃,但是会按照崩溃异常来处理 #20

Open
1546461417 opened this issue Sep 2, 2019 · 1 comment

Comments

@1546461417
Copy link

-(void)safe_logKVODebugInfoWithText:(NSString*)text observer:(id)observer keyPath:(NSString*)keyPath context:(void*)context
{
NSString *method;
if ([text rangeOfString:@"添加"].length>0) {
method=@" addObserver ";存在僵尸对象)
}else{
method=@"removeObserver";存在僵尸对象)
}
NSString *emoji;
if ([text rangeOfString:@"成功"].length>0) {
emoji=@"😀😀😀😀😀";存在僵尸对象)
}else{
emoji=@"😡😡😡😡😡";(存在僵尸对象)
}

// LSKVOSafeLog(@"\n******* %@ %@: ##################\n\t%@(%p) %@ %@(%p) keyPath:%@ context:%p\n----------------------------------------",text,emoji,[self class],self,method,[observer class],observer,keyPath,context);
}

//这里也出现僵尸对象
[regularExp enumerateMatchesInString:callStackSymbolString options:NSMatchingReportProgress range:NSMakeRange(0, callStackSymbolString.length) usingBlock:^(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL * _Nonnull stop) {
if (result) {
mainCallStackSymbolMsg = [callStackSymbolString substringWithRange:result.range];
*stop = YES;
}
}];

@isdotjim
Copy link

搭个车...
想邀请Repo作者来w3c.group创建项目的对应小组。w3c.group是类似知识星球的社群工具,小组可设置为付费且有赞助功能,同时也是一个区块链主导的创作者社区。这是相关介绍:
http://t.cn/Ai1vLcCU
http://t.cn/Ai1vLcCG
http://t.cn/Ai1vLcCA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants