> ## 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.

# PFMemoryHooks

> 封装内存挂钩的结构。

封装内存挂钩的结构。

## 语法

```cpp theme={null}
typedef struct PFMemoryHooks {  
    PFMemAllocFunction* alloc;  
    PFMemFreeFunction* free;  
} PFMemoryHooks;  
```

### 成员

**`alloc`**   PFMemAllocFunction\*

自定义分配挂钩。

**`free`**   PFMemFreeFunction\*

自定义释放挂钩。

## 备注

必须同时设置两个挂钩。

## 要求

**头文件：** PFPlatform.h

## 另请参阅

[PFPlatform 成员](/services/playfab/api-references/c/pfplatform/pfplatform_members)


## Related topics

- [PFMemSetFunctions](/zh-CN/services/playfab/api-references/c/pfplatform/functions/pfmemsetfunctions.md)
- [服务 C API 概览 - PFPlatform.h](/zh-CN/services/playfab/api-references/c/pfplatform/pfplatform_members.md)
- [PFMemGetFunctions](/zh-CN/services/playfab/api-references/c/pfplatform/functions/pfmemgetfunctions.md)
- [PlayFab 统一 SDK 中的内存管理](/zh-CN/services/playfab/sdks/unified-sdk/memory-management.md)
- [PlayFab SDK 产品](/zh-CN/services/playfab/sdks/sdk-products.md)
