mirror of
https://github.com/Readarr/Readarr
synced 2025-12-15 21:02:40 +01:00
Fixed: Memory leak
Explicitly register concrete types as transient (cherry picked from commit f097d30b095d89681eb1aede2e88c4fdefcab516)
This commit is contained in:
parent
5a9d75857d
commit
47b23417e0
1 changed files with 4 additions and 0 deletions
|
|
@ -28,6 +28,10 @@ public static IContainer AutoAddServices(this IContainer container, List<string>
|
|||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue