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
如上图,把SnackbarMessageQueue注入到TestGCViewModel,然后在TestGCView绑定,当关闭TestGCView时,不会触发TestGCView和TestGCViewModel的析构函数,即使手动GC,也不能触发
当我在TestGCView重写的OnClosed方法手动把Snackbar.MessageQueue=null释放引用后,就可以触发析构函数的执行
正常情况不是应该关闭view后,都会回收该view和对应的viewmodel的吗?
5.0
The text was updated successfully, but these errors were encountered:
我改成不用依赖注入,直接new,就可以触发析构函数的执行
Sorry, something went wrong.
No branches or pull requests
Bug explanation
如上图,把SnackbarMessageQueue注入到TestGCViewModel,然后在TestGCView绑定,当关闭TestGCView时,不会触发TestGCView和TestGCViewModel的析构函数,即使手动GC,也不能触发
当我在TestGCView重写的OnClosed方法手动把Snackbar.MessageQueue=null释放引用后,就可以触发析构函数的执行
正常情况不是应该关闭view后,都会回收该view和对应的viewmodel的吗?
Version
5.0
The text was updated successfully, but these errors were encountered: