> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XMEMFREE_ROUTINE 回呼

> XMEMFREE_ROUTINE 回呼

# XMEMFREE\_ROUTINE 回呼

定義記憶體解除配置常式 [XMemFree](/zh-TW/reference/system/xmem/functions/xmemfree) 和 `XMemFreeDefault` 的語法。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
VOID XMEMFREE_ROUTINE(  
         PVOID Address,  
         ULONGLONG Attributes  
)  
```

<a id="parametersSection" />

### 參數

*Address*   \_In\_\
類型：PVOID

要釋放之記憶體的位址。

*Attributes*   \_In\_\
類型：ULONGLONG

記憶體配置的屬性。如需詳細資訊，請參閱 [XALLOC\_ATTRIBUTES](/zh-TW/reference/system/xmem/structs/xalloc_attributes)。

<a id="retvalSection" />

### 傳回值

類型：VOID

無。

<a id="remarksSection" />

## 備註

此函式定義用於 [XMEM\_ALLOCATION\_HOOKS](/zh-TW/reference/system/xmem/structs/xmem_allocation_hooks) 結構中，以定義 [XMemFree](/zh-TW/reference/system/xmem/functions/xmemfree) 和 `XMemFreeDefault` 函式。同樣地，[XMEMALLOC\_ROUTINE](/zh-TW/reference/system/xmem/functions/xmemalloc_routine) 函式定義用於定義 [XMemAlloc](/zh-TW/reference/system/xmem/functions/xmemalloc) 和 `XMemAllocDefault` 函式。

<Note>`XMemFree` 預設實作的原始程式碼會安裝為 Microsoft Game Development Kit (GDK) 的一部分。如需詳細資訊，請參閱 `\GXDK\gameKit\Source\amd64\heap.c` 中的 `XMemFreeDefault` 函式。</Note>

<a id="requirementsSection" />

## 需求

**標頭：** xmem.h

**程式庫：** xmem.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[診斷與記憶體追蹤](/zh-TW/build/console-features/memory/system-memory-diagnostics)\
[XMem](/zh-TW/reference/system/xmem/xmem_members)\
[XMemFreeDefault](/zh-TW/reference/system/xmem/functions/xmemfreedefault)


## Related topics

- [XMEMFREE_ROUTINE callback](/reference/system/xmem/functions/xmemfree_routine.md)
- [Xmemalloc routine](/ko/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMEMALLOC_ROUTINE callback](/reference/system/xmem/functions/xmemalloc_routine.md)
- [XMemSetAllocationHooks](/reference/system/xmem/functions/xmemsetallocationhooks.md)
- [XALLOC_ALLOCATOR_IDS](/reference/system/xmem/enums/xalloc_allocator_ids.md)
