Garbage Collection in C# (.NET Framework and .NET Core)