getActivity / Toaster

Android 吐司框架,专治 Toast 各种疑难杂症
Apache License 2.0
3.25k stars 406 forks source link

把leakcanary升级到2.6后每次弹吐司都会提示内存泄露,您的demo里如果也升到2.6也是一样的 #60

Closed wangzhongITger closed 3 years ago

getActivity commented 3 years ago

getActivity commented 3 years ago

感谢反馈,我收到这个问题之后第一时间进行了复现,确实有这个问题,但是很遗憾地告诉你,这个内存泄漏不是框架导致的,从泄漏的堆栈来看,没有看到和框架有关的代码。

wangzhongITger commented 3 years ago

嗯嗯,是这样的

lianyagang commented 2 years ago

override fun onBackPressed() { // https://issuetracker.google.com/issues/139738913 if (Build.VERSION.SDK_INT == Build.VERSION_CODES.Q && isTaskRoot && (supportFragmentManager.primaryNavigationFragment?.childFragmentManager?.backStackEntryCount ?: 0) == 0 && supportFragmentManager.backStackEntryCount == 0 ) { finishAfterTransition() } else { super.onBackPressed() } }