Leaks
Crystal_xing
温不增华,寒不改叶
展开
-
Android -Webview内存泄漏
解决方案: onDestory中加入如下代码,wvTerm是webview的id: if (dataBinding?.wvTerm != null) { val parent = dataBinding?.wvTerm?.parent (parent as? ViewGroup)?.removeView(dataBinding?.wvTerm) dataBinding?.wvTerm?.apply {原创 2021-07-27 11:31:44 · 355 阅读 · 0 评论 -
Android Leaks内存泄漏检测Rxbus
在Leaks上发现如上日志, 便推测和Rxbus有关,在销毁Activity的回调中,把观察者设为null便不泄漏了: override fun onDestroy() { subscription?.unsubscribe() super.onDestroy() } ...原创 2019-12-12 19:15:21 · 536 阅读 · 0 评论