語言

NetNamedPipeBindingElement.MaxBufferPoolSize 屬性

定義

取得或設定緩衝池的最大大小(以位元組為單位)。

public:
 property long MaxBufferPoolSize { long get(); void set(long value); };
[System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)]
[System.Configuration.LongValidator(MinValue=0)]
public long MaxBufferPoolSize { get; set; }
[<System.Configuration.ConfigurationProperty("maxBufferPoolSize", DefaultValue=524288)>]
[<System.Configuration.LongValidator(MinValue=0)>]
member this.MaxBufferPoolSize : int64 with get, set
Public Property MaxBufferPoolSize As Long

屬性值

緩衝池的最大容量。 預設為 524,288 位元組(512 × 1024)。

屬性

備註

Windows 通訊基礎(WCF)的許多部分都使用緩衝區。 每次使用緩衝區都建立與銷毀成本高昂,緩衝區的垃圾回收也同樣昂貴。 使用緩衝池時,你可以從緩衝池中取一個緩衝區,使用完畢後再歸還給池。 因此避免了建立與銷毀緩衝區的開銷。

適用於