AppDomain.MonitoringSurvivedMemorySize 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得最後一個集合存活且已知被當前應用域引用的位元組數。
public:
property long MonitoringSurvivedMemorySize { long get(); };
public long MonitoringSurvivedMemorySize { get; }
public long MonitoringSurvivedMemorySize { [System.Security.SecurityCritical] get; }
member this.MonitoringSurvivedMemorySize : int64
[<get: System.Security.SecurityCritical>]
member this.MonitoringSurvivedMemorySize : int64
Public ReadOnly Property MonitoringSurvivedMemorySize As Long
屬性值
存活的位元組數。
- 屬性
例外狀況
static(Visual Basic 中Shared)MonitoringIsEnabled 屬性設為 false。
備註
統計數據會隨著每次垃圾回收而更新。 然而,只有在完整且阻塞性地收集後,它們才保證準確;也就是說,包含所有世代的集合,並在收集過程中停止應用。 例如, GC.Collect() 方法過載會執行完整的區塊收集。 (並行收集會在背景進行,不會阻擋應用程式。)