GC.AllocateUninitializedArray<T>(Int32, Boolean) Método

Definição

Aloca uma matriz enquanto ignora a inicialização zero, se possível.Allocates an array while skipping zero-initialization, if possible.

public static T[] AllocateUninitializedArray<T> (int length, bool pinned = false);
static member AllocateUninitializedArray : int * bool -> 'T[]
Public Shared Function AllocateUninitializedArray(Of T) (length As Integer, Optional pinned As Boolean = false) As T()

Parâmetros de tipo

T

Especifica o tipo do elemento da matriz.Specifies the type of the array element.

Parâmetros

length
Int32

Especifica o comprimento da matriz.Specifies the length of the array.

pinned
Boolean

Especifica se a matriz alocada deve ser fixada.Specifies whether the allocated array must be pinned.

Retornos

T[]

Um objeto de matriz com memória não inicializada, exceto se ele contiver referências ou se for muito pequeno para ser desafixado.An array object with uninitialized memory except if it contains references or if it's too small for unpinned.

Comentários

Se fixado for definido como true , T não deverá ser um tipo de referência ou um tipo que contenha referências de objeto.If pinned is set to true, T must not be a reference type or a type that contains object references.

Aplica-se a