語言

Debug.StartAllocCounting 方法

定義

警告

deprecated

開始計算記憶體分配的數量和總體大小。

[Android.Runtime.Register("startAllocCounting", "()V", "")]
[System.Obsolete("deprecated")]
public static void StartAllocCounting();
[<Android.Runtime.Register("startAllocCounting", "()V", "")>]
[<System.Obsolete("deprecated")>]
static member StartAllocCounting : unit -> unit
屬性

備註

開始計算記憶體分配的數量和總體大小。

此 #startAllocCounting() start 方法會重置計數並啟用計數。 此 #stopAllocCounting() stop 方法會關閉計數,避免分析碼產生額外分配。 各種 get 方法會回傳指定的值。 各種方法會 reset 重置指定的計數。

計數是為整個系統(全域)以及每個執行緒而保留。 除了目前執行緒外,其他執行緒的每個執行緒計數不會被「重置」或「開始」呼叫清除。

此會員已被棄用。 精確的計數會增加執行時間的負擔,且可以被移除。

Java 文件 android.os.Debug.startAllocCounting()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於