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
At present ExternallyControlledLifetimeManager is being used as a weak reference lifetime manager. It is allowed to be used in all types of registrations.
Problem
If a Type or Factory are registered with ExternallyControlledLifetimeManager it works like this:
No instance is present: create a new one and hold a weak reference
Instance is still alive: return the instance
Instance went out of scope: create a new instance
In case of externally registered instance the container has no knowledge of how to create a new instance. This break the logic above.
The solution to this problem is to reserve ExternallyControlledLifetimeManager to be registered only with external instances and keep strong reference to these to prevent it from being collected by GC.
The text was updated successfully, but these errors were encountered:
Description
At present ExternallyControlledLifetimeManager is being used as a weak reference lifetime manager. It is allowed to be used in all types of registrations.
Problem
If a Type or Factory are registered with ExternallyControlledLifetimeManager it works like this:
In case of externally registered instance the container has no knowledge of how to create a new instance. This break the logic above.
The solution to this problem is to reserve ExternallyControlledLifetimeManager to be registered only with external instances and keep strong reference to these to prevent it from being collected by GC.
The text was updated successfully, but these errors were encountered: