ArrayPool<T> Sınıf

Tanım

T [] türünde örnekleri yeniden kullanmaya izin veren bir kaynak havuzu sağlar.Provides a resource pool that enables reusing instances of type T[].

generic <typename T>
public ref class ArrayPool abstract
public abstract class ArrayPool<T>
type ArrayPool<'T> = class
Public MustInherit Class ArrayPool(Of T)

Tür Parametreleri

T

Kaynak havuzundaki nesnelerin türü.The type of the objects that are in the resource pool.

Devralma
ArrayPool<T>

Açıklamalar

ArrayPool<T>Kira ve döndürme arabellekleri için sınıfı kullanmak ( Rent ve Return yöntemlerini kullanarak), dizilerin sık sık oluşturulduğu ve kaldırıldığı durumlarda performansı iyileştirebilir ve bu da çöp toplayıcısına önemli ölçüde bellek baskısı elde edebilir.Using the ArrayPool<T> class to rent and return buffers (using the Rent and Return methods) can improve performance in situations where arrays are created and destroyed frequently, resulting in significant memory pressure on the garbage collector.

Oluşturucular

ArrayPool<T>()

ArrayPool<T> sınıfının yeni bir örneğini başlatır.Initializes a new instance of the ArrayPool<T> class.

Özellikler

Shared

Paylaşılan bir ArrayPool<T> örneği alır.Gets a shared ArrayPool<T> instance.

Yöntemler

Create()

ArrayPool<T> sınıfının yeni bir örneğini oluşturur.Creates a new instance of the ArrayPool<T> class.

Create(Int32, Int32)

ArrayPool<T>Belirtilen yapılandırmayı kullanarak sınıfının yeni bir örneğini oluşturur.Creates a new instance of the ArrayPool<T> class using the specified configuration.

Equals(Object)

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.Determines whether the specified object is equal to the current object.

(Devralındığı yer: Object)
GetHashCode()

Varsayılan karma işlevi olarak işlev görür.Serves as the default hash function.

(Devralındığı yer: Object)
GetType()

TypeGeçerli örneği alır.Gets the Type of the current instance.

(Devralındığı yer: Object)
MemberwiseClone()

Geçerli bir basit kopyasını oluşturur Object .Creates a shallow copy of the current Object.

(Devralındığı yer: Object)
Rent(Int32)

En az istenen uzunluğa sahip bir arabellek alır.Retrieves a buffer that is at least the requested length.

Return(T[], Boolean)

Daha önce Rent(Int32) aynı örnek üzerinde yöntemi kullanılarak elde edilen havuza bir dizi döndürür ArrayPool<T> .Returns an array to the pool that was previously obtained using the Rent(Int32) method on the same ArrayPool<T> instance.

ToString()

Geçerli nesneyi temsil eden dizeyi döndürür.Returns a string that represents the current object.

(Devralındığı yer: Object)

Şunlara uygulanır

İş Parçacığı Güvenliği

Bu sınıf, iş parçacığı güvenlidir.This class is thread-safe. Tüm üyeler eşzamanlı olarak birden çok iş parçacığı tarafından kullanılabilir.All members may be used by multiple threads concurrently.