namespace ComputeSharp.NetStandard.System;
///
/// A polyfill type that mirrors some methods from on .NET 6.
///
internal static class GC
{
///
/// Allocate an array while skipping zero-initialization if possible.
///
/// Specifies the type of the array element.
/// Specifies the length of the array.
/// Specifies whether the allocated array must be pinned.
///
/// If pinned is set to true, must not be a reference type or a type that contains object references.
///
public static T[] AllocateUninitializedArray(int length, bool pinned = false)
{
return new T[length];
}
}