<PackageReference Include="Castle.Windsor" Version="3.1.0" />

IComponentActivator

public interface IComponentActivator
Implements the instance creation logic. The default implementation should rely on an ordinary call to Activator.CreateInstance().
object Create(CreationContext context, Burden burden)

Should return a new component instance.

void Destroy(object instance)

Should perform all necessary work to dispose the instance and/or any resource related to it.