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

# game_chat_free_memory_callback

> game_chat_free_memory_callback

# game\_chat\_free\_memory\_callback

Game Chat 2 라이브러리가 이전에 할당된 메모리 버퍼가 더 이상 필요하지 않아 해제될 수 있을 때마다 호출되는 콜백을 나타냅니다.

## 구문

```cpp theme={null}
typedef  
void  
(game_chat_callback * game_chat_free_memory_callback)(  
    _In_ _Post_invalid_ void * pointer,  
    _In_ uint32_t memoryTypeId  
    );  
```

### 매개 변수

*pointer*   \_In\_ \_Post\_invalid\_\
형식: void\*

이전에 할당된 메모리 버퍼에 대한 포인터입니다. 이 값은 절대 null 포인터가 되지 않습니다.

*memoryTypeId*   \_In\_\
형식: uint32\_t

해제되는 메모리에 대한 Game Chat 2 내부 범주를 나타내는 불투명 식별자입니다.

## 설명

이 함수는 사용 가능한 경우 Game Chat 2 라이브러리가 이전에 할당된 메모리 버퍼가 더 이상 필요하지 않아 해제될 수 있을 때마다 호출되는 사용자 지정 콜백을 나타냅니다. 이 콜백은 선택 사항이며 [chat\_manager::set\_memory\_callbacks](https://docs.xbox.com/ko/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_set_memory_callbacks.md) 메서드를 호출하여 설치할 수 있습니다. 사용자 지정 콜백이 설치되지 않은 경우 Game Chat 2는 자체 기본 함수를 사용하여 메모리를 할당하고 해제합니다. [chat\_manager::get\_memory\_callbacks](https://docs.xbox.com/ko/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_memory_callbacks.md) 메서드를 사용하여 앱이 메모리를 할당하고 해제하는 데 기본 또는 사용자 지정 함수를 사용하고 있는지 확인할 수 있습니다.

> [!NOTE]
>
> 메모리를 할당하고 해제하는 데 사용자 지정 함수를 사용하려면 해당하는 [game\_chat\_allocate\_memory\_callback](https://docs.xbox.com/ko/reference/chat/gamechat2/functions/game_chat_allocate_memory_callback.md)과 `game_chat_free_memory_callback` 함수 집합을 구현해야 합니다. 메모리를 할당하고 해제하는 데 사용자 지정 함수와 기본 함수를 혼합할 수 없습니다.

이 콜백은 Game Chat 2 라이브러리가 앱의 해당 [game\_chat\_allocate\_memory\_callback](https://docs.xbox.com/ko/reference/chat/gamechat2/functions/game_chat_allocate_memory_callback.md)에 의해 이전에 반환된 메모리 버퍼 사용을 완료했을 때마다 호출되며, 앱이 메모리 버퍼를 해제할 수 있음을 나타냅니다.

## 요구 사항

**헤더:** GameChat2.h

**지원 플랫폼:** Windows, XBOX One 제품군 콘솔 및 XBOX Series 콘솔

## 함께 보기

[Game Chat 2 소개](https://docs.xbox.com/ko/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)\
[chat\_manager](https://docs.xbox.com/ko/reference/chat/gamechat2/classes/chat_manager/chat_manager.md)\
[GameChat2 멤버](https://docs.xbox.com/ko/reference/chat/gamechat2/gamechat2_members.md)


## Related topics

- [set_memory_callbacks](https://docs.xbox.com/ko/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_set_memory_callbacks.md)
- [get_memory_callbacks](https://docs.xbox.com/ko/reference/chat/gamechat2/classes/chat_manager/methods/chat_manager_get_memory_callbacks.md)
- [game_chat_allocate_memory_callback](https://docs.xbox.com/ko/reference/chat/gamechat2/functions/game_chat_allocate_memory_callback.md)
- [GameChat2 멤버(API 콘텐츠)](https://docs.xbox.com/ko/reference/chat/gamechat2/gamechat2_members.md)
- [PartyFreeMemoryCallback](https://docs.xbox.com/ko/services/playfab/multiplayer/networking/reference/callbacks/partyfreememorycallback.md)
