-
Notifications
You must be signed in to change notification settings - Fork 309
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
异步调用可能产生内存泄露 #69
Comments
如果需要改库源码得话,可以提个PR;如果是使用方式上该注意的问题,可以贴出你的代码供大家参考。 |
用了这个sdk,线上包一直闪退报错,大神能解决下么? SEGV_ACCERR 出错堆栈
|
SEGV_ACCERR 出错堆栈 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
目前在使用的是3.0.2版本。
在DWKWebView中执行到
-(NSString *)call:(NSString*) method :(NSString*) argStr
这一方法时,在266行定义completionHandler时,block中使用了self,而后把这个completionHandler作为用户自定义的异步方法的参数传给了JavascriptInterfaceObject对象。这个情况可能会造成DWKWebView对象长时间被强引用不能释放,导致一些内存检测机制告警。
我在定义这个completionHandler使用weak-strong dance处理了一下,检测不到内存泄露了。
希望在新版本中能评估一下这个问题。
The text was updated successfully, but these errors were encountered: