Freigeben über


Debug.StartAllocCounting Method

Definition

Caution

deprecated

Start counting the number and aggregate size of memory allocations.

[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
Attributes

Remarks

Start counting the number and aggregate size of memory allocations.

The #startAllocCounting() start method resets the counts and enables counting. The #stopAllocCounting() stop method disables the counting so that the analysis code doesn't cause additional allocations. The various get methods return the specified value. And the various reset methods reset the specified count.

Counts are kept for the system as a whole (global) and for each thread. The per-thread counts for threads other than the current thread are not cleared by the "reset" or "start" calls.

This member is deprecated. Accurate counting is a burden on the runtime and may be removed.

Java documentation for android.os.Debug.startAllocCounting().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to