Syntax
Parameters
pointer  _In_ _Post_invalid_ void*
The pointer to the memory buffer that your PFMemAllocFunction callback allocated. This value is never nullptr. The pointer isn’t valid after the callback returns.
memoryTypeId  _In_ uint32_t
An opaque identifier for the internal category of memory being freed. Ignore this value.
Return value
Type: voidRemarks
To install this callback, set it in thefree member of a PFMemoryHooks structure and pass the structure to PFMemSetFunctions before you call PFInitialize. Set the alloc member to a matching PFMemAllocFunction callback at the same time. PFMemSetFunctions returns E_INVALIDARG if only one of the two members is set.
PlayFab calls this callback when it has finished using a memory buffer that your PFMemAllocFunction callback returned, so that you can free the buffer. PlayFab doesn’t call this callback with nullptr.
If libHttpClient isn’t initialized yet when you call PFMemSetFunctions, PlayFab also installs hooks that route libHttpClient’s frees through this callback.
PlayFab can call this callback from different threads, so make it thread-safe.
