# Dispose

> Disposes of an existing PackedMemorySnapshot object and closes the file reader.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Profiling.Memory.Experimental](/engine/6000.7/script-reference/unityeditor/profiling/memory/experimental.md)
* **Assembly:** UnityEditor.CoreModule

## Dispose()

Disposes of an existing [PackedMemorySnapshot](/engine/6000.7/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot.md) object and closes the file reader.

> **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 void Dispose()
```

## Dispose(bool)

Disposes of an existing [PackedMemorySnapshot](/engine/6000.7/script-reference/unityeditor/memoryprofiler/packedmemorysnapshot.md) object and closes the file reader.

> **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
protected virtual void Dispose(bool disposing)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)):&#x20;
