ADOBE FLEX BUILDER 3
Using Adobe Flex Builder 3
168
The following table describes the columns in the Memory Snapshot view:
You typically use a memory snapshot as a starting point to determine which classes you should focus on for memory
optimizations or to find memory leaks. You do this by creating multiple memory snapshots at different points in time
and then comparing the differences in the Loitering Objects or Allocation Trace views.
You can save memory snapshots to compare an applications state during a different profiling session. For more infor-
mation, see Saving and loading profiling data” on page 162.
When you double-click a row in the Memory Snapshot view, the profiler displays the Object References view. This
view displays the stack traces for the current classs instances. You view the stack traces for the current classs
instances in the Object References view. For more information about the Object References view, see “Using the
Object References view” on page 169.
You can also limit the data in the Memory Snapshot view by using the profiler filters. For more information, see
About profiler filters” on page 183.
Using the Object References view
The Object References view displays stack traces for classes that were instantiated in the application.
To open the Object References view, double-click a class name in the Memory Snapshot or Loitering Objects views.
The Object References view displays information about the selected classs instances.
The Object References view displays data in two tables: the Instances table and the Allocation Trace table.
The Instances table lists all objects that hold references to the current object. The number in parentheses after the
class name is the total number of references to the current object. You cannot view the number of forward references
for an object. If no objects hold references to the specified object, then there will be no objects listed in this table.
This would not normally happen because that object should have been garbage collected if it had no references.
Column Description
Class The classes that had instances in memory at the time that you recorded the memory snapshot.
Package The package that each class is in. If the class is not in a package, then the value of this field is the file name that the class is
in. The number following the dollar sign is a unique ID for that class.
If the Package field is empty, the class is in the global package or the unnamed package.
Instances The number of instances in memory of each class at the time that you recorded the memory snapshot.
Memory The amount of memory, in bytes, that all instances of each class used at the time that you recorded the memory snapshot.
ADOBE FLEX BUILDER 3
Using Adobe Flex Builder 3
169
The following example shows the Instances table in the Object References view:
The following table describes the columns in the Instances table:
The Allocation Trace table shows the stack trace for the selected instance in the Instances table. When you select an
instance in the Instances table, the profiler displays the call stack for that instance in the Allocation Trace table.
Column Description
Instance The class of the object that holds a reference to the specified object.
Property The property of the object that holds a reference to the specified object. For example, if you have object o with a
property
i, and assign that property to point to your buttons label:
o.i = myButton.label;
That creates a reference to myButton.label from property i.
id The reference ID of the object that holds the reference to the selected object.

Get ADOBE® FLEX® BUILDER™ 3: USING ADOBE FLEX BUILDER 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.