# VirtualFree

```csharp
[DllImport("KERNEL32.dll", ExactSpelling = true, SetLastError = true)]
[DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
public static extern unsafe BOOL VirtualFree(
    void* lpAddress,
    nuint dwSize,
    VIRTUAL_FREE_TYPE dwFreeType);
```

[virtual\_free\_type](https://www.pinvoke.dev/memory/virtual_free_type "mention")
