mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-06 08:46:34 +00:00
Fixed: Memory leak
Explicitly register concrete types as transient (cherry picked from commit f097d30b095d89681eb1aede2e88c4fdefcab516)
This commit is contained in:
@@ -28,6 +28,10 @@ namespace NzbDrone.Common.Composition.Extensions
|
||||
serviceTypeCondition: type => type.IsInterface && !string.IsNullOrWhiteSpace(type.FullName) && !type.FullName.StartsWith("System"),
|
||||
reuse: Reuse.Singleton);
|
||||
|
||||
container.RegisterMany(assemblies,
|
||||
serviceTypeCondition: type => !type.IsInterface && !string.IsNullOrWhiteSpace(type.FullName) && !type.FullName.StartsWith("System"),
|
||||
reuse: Reuse.Transient);
|
||||
|
||||
var knownTypes = new KnownTypes(assemblies.SelectMany(x => x.GetTypes()).ToList());
|
||||
container.RegisterInstance(knownTypes);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user