I am kinda very confused when to use dispose in flutter. Are there any good tutorials about this?
In the cookbook https://flutter.io/docs/cookbook/forms/focus:
void dispose() {
// Clean up the focus node when the Form is disposed
myFocusNode.dispose();
super.dispose();
}
Why do I have to call myFocusNode.dispose();? What happened if I don't call it?
Please explain a bit clear or give me some obvious bad code examples showing bad results when not to call dispose for FocusNode or other situations instead of simply telling me this will cause memory leak...
Thanks a lot.