Replies: 1 comment
-
They aren't mutually exclusive.
That's the opposite. Providers typically aren't disposed. It's their state that is disposed.
I don't understand this question. What does "a new instance of the same provider" mean? |
Beta Was this translation helpful? Give feedback.
-
I noticed while reading about autoDispose and ref.maintainState, I was confused for a bit as those seemed to be mutually exclusive ideas.
And then I realized (I hope correctly) that you're making a distinction between the provider object itself, and the state stored by it in the ProviderContainer.
And if we dispose the provider, but keep the state, what are the implications for memory leaks?? In other words, what is really gained by clearing up the provider, but leaving the state in place??
Finally, please clarify whether a NEW instance of this same provider (assuming identical Scope / ProviderContainer) will capture/reuse the stored state, or will it THEN destroy and recreate the "maintainEDState"??
Beta Was this translation helpful? Give feedback.
All reactions