Objects and Allocations
The Objects and Allocations view displays all crawled snapshot data in a table format. You can use this view to process the data with filters (sort, group, match) and extract relevant information. Use the Select Table View dropdown menu to select from the following tables:
- Raw Data: Select from a list of raw data to view.
- All Managed Objects: a collection of all managed objects (IL2CPP or Mono) in the memory snapshot.
- All Native Objects: a collection of all native objects of types that inherit the
Unity.Object
in the memory snapshot. - All Objects: a collection of all objects (native and managed) in the snapshot.
- All oc: Select from a list of allocations to view.
The Objects and Allocations view, displaying All Managed Objects
Table columns
The following is an overview of what each column means:
Column | Description |
---|---|
Index | The index of the object's entry in the All Objects table. |
Name | Displays an object's address in the memory. For variables, this column displays the name of the variable. |
Value | Highlights objects with variables in blue, and you can select the entry to see further information on this object. For objects without variables, this column displays the address in the memory (the same as the Name column). For variables, it displays the value of the variable. |
Type | Displays the class of the object or variable. |
Data Type | Displays what data type of the object from one of the following values: Managed Array (Mono/IL2CPP array), Managed Object (Mono/IL2CPP object), or Native Object (C++ object) |
Native Object Name | Displays the name of the native object, otherwise this field is empty. |
Length | Displays the number of elements in a managed array's collection, otherwise this field is empty. |
Static | Displays True if the field is static, otherwise displays False. |
RefCount | Displays the count of other objects that reference this object. |
Owned Size | Displays the size of the managed type of a managed object. For managed references, this column displays the size of the pointer, and for native objects it displays the size of the object. In all other cases it displays 0. |
Target Size | Displays the size of a static value's type. For managed references, this column displays the size of the referenced object, and for native references, it displays the size of the referenced object. In all other cases, it displays 0. |
Native Size | Displays the size of the native object, otherwise this field is empty. |
Native Instance ID | Displays the ID of the corresponding native object for a managed object. Otherwise, this field is empty. |
Address | Displays the object's address in the memory. |
Unique String | An internal entry used for comparison of objects. |
Diff tables
When you inspect the Diff of two snapshots, all of the tables are available as diff tables. The Diff tables, such as Diff All Objects, Diff All Managed Objects, and Diff All Native Objects, are the same as the corresponding tables. The key difference is that they contain a Diff column, as shown below. For each object in the table, the Diff displays whether the object is either Same, New, or Deleted.
The Memory Profiler also labels the snapshot with the older timestamp as Old and the snapshot with the most recent timestamp as New. This makes it easier to determine which snapshot is being compared.
All Objects Diff table view, with Diff column highlighted
Filter tables
To filter the data in the columns, select the header of the column you want to sort by and you can choose from:
- Group: Groups all objects together that have a matching value. You can apply this filter to multiple columns. When you filter this way, each group contains the count of the number of objects in brackets. Select the group to expand it.
- Sort Ascending: Sort the values from lowest to highest.
- Sort Descending: Sort the values from highest to lowest.
- Match: Adds a text field that you can use to enter a value to search for a match or a string contained in the column.
When you add a filter to the table, it appears above the table. To remove a filter, select the X button next to it. The filters apply in order from left to right (oldest to newest). Click on groups that have a group filter applied to expand the group.
Filter options at the top of the Objects and Allocations view