# FreeTracked

> Free memory with leak tracking.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## FreeTracked(void\*, Allocator)

Free memory with leak tracking.

```csharp
public static void FreeTracked(void* memory, Allocator allocator)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): Memory pointer.**** (\[Allocator]\(/engine/6000.7/script-reference/unity/collections/allocator)): Allocator.

## FreeTracked(void\*, MemoryLabel)

Free memory with leak tracking, using the specified memory label.

```csharp
public static void FreeTracked(void* memory, MemoryLabel label)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): Memory pointer.**** (\[MemoryLabel]\(/engine/6000.7/script-reference/unity/collections/memorylabel)): The memory label that was used to allocate the memory. The memory label must match the one used during allocation to ensure correct deallocation.
