mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Don't create multiple instances of the same type
This commit is contained in:
@@ -512,7 +512,8 @@ namespace Emby.Server.Implementations
|
||||
var parts = GetExportTypes<T>()
|
||||
.Select(x => CreateInstanceSafe(x))
|
||||
.Where(i => i != null)
|
||||
.Cast<T>();
|
||||
.Cast<T>()
|
||||
.ToList(); // Convert to list so this isn't executed for each iteration
|
||||
|
||||
if (manageLifetime)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user