# PackedMemorySnapshot

> PackedMemorySnapshot is a compact representation of a memory snapshot that a player has sent through the profiler connection.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Profiling.Memory.Experimental](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental.md)
* **Assembly:** UnityEditor.CoreModule
* **Implements:** [IDisposable](https://learn.microsoft.com/dotnet/api/system.idisposable)

> **Warning:**
>
> **Deprecated.** This API is outdated and will be removed. Please check out the Memory Profiler Package ([https://docs.unity3d.com/Packages/com.unity.memoryprofiler@latest/](https://docs.unity3d.com/Packages/com.unity.memoryprofiler@latest/))

```csharp
public class PackedMemorySnapshot : IDisposable
```

## Properties

| Property                                                                                                                                                 | Description                                                                                                                                                                                                       |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [captureFlags](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/captureflags.md)                           | Flags corresponding to the fields present in a returned memory snapshot.                                                                                                                                          |
| [connections](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/connections.md)                             | Connections is an array of from,to pairs that describe which things are keeping which other things alive.                                                                                                         |
| [fieldDescriptions](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/fielddescriptions.md)                 | Array of Field Descriptions, referenced by Type Description entries by array index.                                                                                                                               |
| [filePath](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/filepath.md)                                   | Path to the memory snapshot file.                                                                                                                                                                                 |
| [gcHandles](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/gchandles.md)                                 | All GC handles in use in the memorysnapshot.                                                                                                                                                                      |
| [managedHeapSections](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/managedheapsections.md)             | Array of actual managed heap memory sections.                                                                                                                                                                     |
| [managedStacks](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/managedstacks.md)                         | Array of managed stacks in a memory snapshot.                                                                                                                                                                     |
| [nativeAllocations](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativeallocations.md)                 | Array of native allocation data, captured in C++.                                                                                                                                                                 |
| [nativeAllocationSites](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativeallocationsites.md)         | Array of native allocation site data, captured in C++.                                                                                                                                                            |
| [nativeCallstackSymbols](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativecallstacksymbols.md)       | Array of callstack symbols, used by native allocation site data.                                                                                                                                                  |
| [nativeMemoryLabels](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativememorylabels.md)               | Array of memory labels, used by native allocation site data.                                                                                                                                                      |
| [nativeMemoryRegions](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativememoryregions.md)             | Array of native memory regions, which houses native allocations.                                                                                                                                                  |
| [nativeObjects](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativeobjects.md)                         | All native C++ objects that were loaded at time of the snapshot.                                                                                                                                                  |
| [nativeRootReferences](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativerootreferences.md)           | Array of native root references, which represent ownership of native allocation data.                                                                                                                             |
| [nativeTypes](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/nativetypes.md)                             | Descriptions of all the C++ unity types the profiled player knows about.                                                                                                                                          |
| [recordDate](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/recorddate.md)                               | The time and date at which the snapshot was recorded.                                                                                                                                                             |
| [typeDescriptions](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/typedescriptions.md)                   | An array of indexes into [PackedMemorySnapshot.typeDescriptions](/engine/6000.5/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot/typedescriptions.md) indetifying the type this field belongs to. |
| [version](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/version.md)                                     | The current snapshot format version.                                                                                                                                                                              |
| [virtualMachineInformation](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/virtualmachineinformation.md) | Information about the virtual machine running executing the managed code inside the player.                                                                                                                       |

## Methods

| Method                                                                                                               | Description                                                                                                                                                           |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Dispose](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/dispose.md) | Disposes of an existing [PackedMemorySnapshot](/engine/6000.5/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot.md) object and closes the file reader. |

## Static Methods

| Method                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                     |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Convert](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/convert.md) | Converts the specified old format [PackedMemorySnapshot](/engine/6000.5/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot.md) object to a new [PackedMemorySnapshot](/engine/6000.5/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot.md) format object and writes it to the location and file name specified the the write path. |
| [Load](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/load.md)       | Load memory snapshot from given file path.                                                                                                                                                                                                                                                                                                                      |
| [Save](/engine/6000.5/script-reference/unityeditor/profiling/memory/experimental/packedmemorysnapshot/save.md)       | Copy the memory snapshot file to the given file path.                                                                                                                                                                                                                                                                                                           |
