PartyManager::SetMemoryCallbacks
Optionally configures the memory allocation and freeing callbacks the Party library should use.
Syntax
PartyError SetMemoryCallbacks(
PartyAllocateMemoryCallback allocateMemoryCallback,
PartyFreeMemoryCallback freeMemoryCallback
)
Parameters
allocateMemoryCallback
PartyAllocateMemoryCallback
A pointer to the custom allocation callback to use.
freeMemoryCallback
PartyFreeMemoryCallback
A pointer to the custom freeing callback to use.
Return value
PartyError
c_partyErrorSuccess
if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via GetErrorMessage().
Remarks
This method allows the title to install custom memory allocation functions in order to service all requests by the Party library for new memory buffers instead of using its default allocation functions.
The allocateMemoryCallback
and freeMemoryCallback
parameters must both be non-null.
To use this method, it must be called before any other Party method except for PartyManager::GetMemoryCallbacks(). This method cannot be called again for the lifetime of this process.
Requirements
Header: Party.h
See also
PartyManager
PartyAllocateMemoryCallback
PartyFreeMemoryCallback
PartyManager::GetMemoryCallbacks
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin