game_chat_allocate_memory_callback
A callback invoked every time a new memory buffer must be dynamically allocated by the Game Chat library.Syntax
Parameters
size _In_Type: size_t The size of the allocation to be made. This value will never be zero. memoryTypeId _In_
Type: uint32_t A pointer to an allocated block of memory of the specified size, or a null pointer if allocation failed.
Remarks
This callback is optionally installed using the chat_manager::set_memory_callbacks() method. The callback must allocate and return a pointer to a contiguous block of memory of the specified size that will remain valid until the app’s corresponding game_chat_free_memory_callback is invoked to release it. If this is not possible, the callback must return a null pointer to fail the allocation. Memory allocation failures are sometimes considered benign but will usually cause current Game Chat library operation(s) to fail.Requirements
Header: GameChat2.h Supported platforms: Windows, XBOX One family consoles and XBOX Series consolesSee also
GameChat2 memberschat_manager::get_memory_callbacks
chat_manager::set_memory_callbacks
