-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fragment缓存View导致内存泄漏 #16
Comments
这个我解决不了,因为我不是专业开发者( |
尝试修了一下,但是不确保完全修复 |
这个问题就得涉及到FragmentNavigation的源码了,navigate的方式在实际用的是fragmentmanager的replace,所以才需要缓存view避免视图重新刷新,这个问题感觉非常逆天(https://issuetracker.google.com/issues/127932815?pli=1)可以看这个链接的对话。 限制navigation的问题最大的问题我感觉就只有缓存方式了,如果要修复直接拷贝navigation的类去修复或者缓存view(但是会内存泄漏)其他问题还有很多,我现在已经打算弃用这个导航了,直接使用fragmentManger手动管理show、replace、hide |
项目过于庞大和屎山,Pr不太合适,建议重0开始... |
我的态度是,能用就行,毕竟我不是专业写安卓的。谁想从零开始就交给他自己吧。😂 |
问一下老哥这个接口怎么搞到手的?我打算自己搞一个这个试试 |
我在想作者是不是抓包拿到的数据和接口😂 |
林子大了; |
当然是抓包了😂你可以试试http canary |
fragment切回时会导致重走onCreateView,这导致了内存泄漏
The text was updated successfully, but these errors were encountered: