Guides and Sample Code

Developer

Instruments User Guide

On This Page

Leaks Instrument

Overview

Instrument Description

The Leaks instrument captures information about leaked memory. It can record information from a single process only.

Supported Platforms

iOS

OS X

Related Profiling Templates

Leaks Profiling Template

Timeline Pane

The timeline pane displays the information based on the instrument’s Style configuration.

Record Settings

This instrument doesn’t have any record settings you can configure.

Display Settings

Click the Display Settings button (image: ../Art/instruments_displaysettings_button_inline_2x.png) in the inspector pane to customize the following display settings.

Track Display Settings

These settings control how information is displayed in the timeline pane.

Setting

Description

Options

Style

How information is presented. This is a fixed setting, and can’t be changed.

  • Leaked Memory by Discovery Time: The time that the leak was detected.

Snapshots

Allows you to configure how often the instrument looks at your app and records a snapshot. You can specify an interval in seconds, or click Snapshot Now to record a snapshot at any time while profiling. Also displays a status, indicating when snapshotting is in progress or when the next snapshot will occur.

Leaks Configuration

The following leaks configuration display settings are available.

Setting

State

Gather Leaked Memory Contents

Off by default.

Call Tree

The following call tree display settings filter the call tree in the detail pane.

Setting

State

Separate by Thread

Off by default.

Invert Call Tree

Off by default.

Hide System Libraries

Off by default.

Flatten Recursion

Off by default.

Call Tree Constraints

The following options filter the call tree to display calls that fall within a specific threshold based on the settings below.

Setting

State

# Leaks

Off by default.

Bytes

Off by default.

Data Mining

Allows you to filter through the collected data for specific symbols and libraries.

Detail Pane Columns

Leaks Detail Type

The following leaks columns are available in the detail pane.

Column name

Definition

Leaked Object

The type of object leaked.

#

The number of leaks associated with the object.

Address

The address of the leaked block.

Size

The size of the leak.

Responsible Library

The library responsible for the leak.

Responsible Frame

The frame that caused the leak.

Cycles & Roots Detail Type

The following cycles & roots columns are available in the detail pane.

Column name

Definition

#

The sequence number.

Type

The number of bytes leaked.

Details

The location of the leak.

Call Tree Detail Type

The following call tree columns are available in the detail pane.

Column name

Definition

Self %

The percentage of bytes used by the call itself.

Self Bytes

The number of bytes used by the call itself.

Bytes Used

The amount of bytes used by the corresponding symbol.

# Leaks

The number of leaks encountered for the call.

Parent %

The percentage of bytes used by the call’s parent.

Source Path

The path to the source file that generated the call.

Category

An icon representing the category of the call.

Library

The name of the library that generated the call.

Symbol Name

The name of the call.