I'm adding a service to the IServiceCollection in my startup as Scoped:
public void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IEmailService, EmailService>();
}
If I were to add a static property to my EmailService implementation, does that mean that my property is not garbage collected and remains in memory even though my EmailService has gone out of scope after my request ends?
I'm looking at some code that has a static property that holds a bearer token. It appears that this token remains in memory once it is set and stays there until my AppPool refreshes after a day.