diff --git a/src/Container/Lifetime/LifetimeContainer.cs b/src/Container/Lifetime/LifetimeContainer.cs index 92ac6359..145054b8 100644 --- a/src/Container/Lifetime/LifetimeContainer.cs +++ b/src/Container/Lifetime/LifetimeContainer.cs @@ -103,6 +103,7 @@ namespace Unity.Container.Lifetime lock (_items) { disposables = _items.OfType() + .Distinct() .Reverse() .ToArray(); _items.Clear(); diff --git a/src/Strategies/LifetimeStrategy.cs b/src/Strategies/LifetimeStrategy.cs index c36bc666..cde4d79e 100644 --- a/src/Strategies/LifetimeStrategy.cs +++ b/src/Strategies/LifetimeStrategy.cs @@ -4,9 +4,7 @@ using Unity.Builder; using Unity.Builder.Strategy; using Unity.Exceptions; using Unity.Lifetime; -using Unity.Policy; using Unity.Registration; -using Unity.Storage; namespace Unity.Strategies {