Skip to content

Commit bdfa8ed

Browse files
author
李杰
committed
update readme
1 parent 42ca5ac commit bdfa8ed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

JJExceptionPrinciple.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ KVO在以下情况会导致闪退:
195195
* 保护key不存在的情况
196196
* 保护重复添加的情况
197197

198+
在开始KVO是采用AssociatedObject释放原理来处理那些忘记keyPath,这里有个问题就是如果开发者重写dealloc,并清理自己的keyPath,会导致AssociatedObject释放时,assgin的类产生野指针,
199+
200+
所以在没找到更好的办法,只能Swizzle dealloc方法,先清理kvo数据,再执行origin dealloc,不过这样就有个细节做不到,无法提示那些keyPath忘记清理.
201+
198202
## NSTimer
199203

200204
NSTimer存在以下问题:

0 commit comments

Comments
 (0)