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 方法重置指定的计数。

系统作为一个整体(全局)和每个线程保留计数。 除当前线程以外的线程的按线程计数不会被“重置”或“start”调用清除。

此成员已弃用。 准确的计数是运行时的负担,可以删除。

Java文档android.os.Debug.startAllocCounting()

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于