We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
弱引用的话是机不可靠的,如果对象没其他引用持有的话,gc触发了就会回收,可能无法达到复用的效果,频繁反射性能可能会变差,这块设计是没问题的么?
The text was updated successfully, but these errors were encountered:
@huxq17 这里使用弱引用,主要是解决 fragment 内存泄漏的问题
而保存 fragment 主要是为了采集 fragment 页面浏览的信息,如果 fragment 被销毁了,不会触发浏览,此处也不应该继续引用 fragment
Sorry, something went wrong.
@YueJZJM 但这里的fragment是你们自己new的,和业务的fragment没关系,没有其他地方引用,gc一下就会回收。譬如说第一次new了一个,下次再用的过程中处罚了gc,又得重新new
@huxq17 感谢建议,的确会有频繁创建的可能,我们内部再考虑考虑优化方案
No branches or pull requests
弱引用的话是机不可靠的,如果对象没其他引用持有的话,gc触发了就会回收,可能无法达到复用的效果,频繁反射性能可能会变差,这块设计是没问题的么?
The text was updated successfully, but these errors were encountered: