bloc
bloc copied to clipboard
feat: investigate use of Finalizer to detect/auto-close unclosed bloc instances
Description
As a developer, it would be helpful to detect if a bloc was not properly closed when it becomes inaccessible to the program. This issue is to investigate the use of Finalizer within bloc to either detect or prevent blocs from not being properly closed when they are no longer accessible.
Additional Context
The Finalizer API is available in Dart 2.17 so this would likely not land anytime soon and this is more for exploratory purposes.