Does this same code leak when run under the .NET Framework and/or .NET Core?