Replies: 1 comment
-
A provider costs almost nothing in terms of memory If you want your state to be destroyed, that's what autoDispose is for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I started to read about riverod and got concerned when the docs recommends to store the providers in global variables.
Although global variables in dart are lazily read, those variables will stay in memory forever. This way if the user starts to navigate in your app, a bunch of Providers will be created and never be destroyed.
Isn't this a cause of concern? Shouldn't the docs address this scenario as well?
Beta Was this translation helpful? Give feedback.
All reactions