|
Discord Social SDK
|
A standard allocator backed by Discord_Alloc and Discord_Free, so container memory comes from the backend installed with InstallAllocator rather than the global operator new.
Public Member Functions | |
| SdkAllocator () noexcept=default | |
| Constructs an allocator. The allocator is stateless, so all instances are interchangeable. | |
| template<typename U> | |
| SdkAllocator (const SdkAllocator< U > &) noexcept | |
| Rebinding constructor required by the standard allocator requirements. | |
| T * | allocate (size_t count) |
| Allocates storage for count objects of type T from the SDK's allocation backend. | |
| void | deallocate (T *ptr, size_t) noexcept |
| Returns storage obtained from allocate to the SDK's allocation backend. | |
Public Types | |
| using | value_type = T |
| The type of object this allocator allocates. | |
| using discordpp::SdkAllocator< T >::value_type = T |
The type of object this allocator allocates.
|
defaultnoexcept |
Constructs an allocator. The allocator is stateless, so all instances are interchangeable.
|
inlinenoexcept |
Rebinding constructor required by the standard allocator requirements.
|
inline |
Allocates storage for count objects of type T from the SDK's allocation backend.
|
inlinenoexcept |
Returns storage obtained from allocate to the SDK's allocation backend.