You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question about ServiceProvider default lifetime #39
What is the motivation is behind using ExternallyControlledLifetimeManager in the constructor of ServiceProvider? Is it intended that the constructed service provider be explicitly injected by the user into the container with a some chosen lifetime?
I see. So in our use case we ran into an issue where unless we explicitly held onto a reference of the service provider returned by BuildServiceProvider, like by injecting it into our unity container with ContainerControlledLifeTimeManager, the ServiceProvider would be garbage collected and cause runtime issues. Which led to to this question about what the intended usage pattern should be.
Activity
ENikS commentedon Mar 15, 2019
kshi219 commentedon Mar 15, 2019
I see. So in our use case we ran into an issue where unless we explicitly held onto a reference of the service provider returned by BuildServiceProvider, like by injecting it into our unity container with ContainerControlledLifeTimeManager, the ServiceProvider would be garbage collected and cause runtime issues. Which led to to this question about what the intended usage pattern should be.
ENikS commentedon Mar 15, 2019
I would need a code sample to verify your scenario and to fix the issue
kshi219 commentedon Mar 18, 2019
Hi, was away over the weekend, will make one up soon
kshi219 commentedon Mar 22, 2019
#40 seems to have a repro attached that captures the essence of what we saw, will not be making another one up, thanks!