Photon C++ Client API
5.0.7.3
|
Namespaces | |
ExitGames | |
ExitGames::Common | |
ExitGames::Common::MemoryManagement | |
Macros | |
#define | EG_SIZE_T |
Functions | |
void * | EG_MALLOC (size_t size) |
void | EG_FREE (void *p) |
void * | EG_REALLOC (void *p, size_t size) |
void * | EG_CALLOC (size_t num, size_t size) |
HighLevelMemoryManagement | |
The template functions in this section are an alternative for the C++ dynamic memory management operators new, new[], delete and delete[]. They are implemented in terms of enhancing the Low Level Memory Management macros and for this reason offer similar advantages over new and co like those macros offer over malloc and co. However same as new and co they also construct and destruct the objects that they allocate and deallocate. | |
#define | ALLOCATE(type, p, ...) |
#define | ALLOCATE_ARRAY(type, p, count, ...) |
#define | REALLOCATE_ARRAY(type, p, count, ...) |
#define | DEALLOCATE(type, p) |
#define | DEALLOCATE_ARRAY(type, p) |
void | setMaxAllocSize (size_t maxAllocSize) |
void | setMaxSizeForAllocatorUsage (size_t maxSizeForAllocatorUsage) |
void | setAllocator (ExitGames::Common::MemoryManagement::AllocatorInterface &allocator) |
void | setAllocatorToDefault (void) |
template<typename Ftype > | |
EG_PRAGMA_VISIBILITY_PUSH_HIDDEN Ftype * | allocate (void) |
template<typename Ftype > | |
Ftype * | allocateArray (size_t count) |
template<typename Ftype > | |
Ftype * | reallocateArray (Ftype *p, size_t count) |
template<typename Ftype > | |
void | deallocate (const Ftype *p) |
template<typename Ftype > | |
void | deallocateArray (const Ftype *p) |
#define ALLOCATE | ( | type, | |
p, | |||
... | |||
) |
This is the macro version of the allocate() template function.
Normally the template version should be preferred, but using the macro instead can be necessary, if you want to pass more than 5 parameters to the constructor or if you want to call a private or protected constructor to which your class has (friend-/subclass-)access.
type | the data type of the instance to create |
p | a pointer, in which the macro will store the address of the freshly created instance |
... | optional arguments to pass to the constructor |
#define ALLOCATE_ARRAY | ( | type, | |
p, | |||
count, | |||
... | |||
) |
This is the macro version of the allocateArray() template function.
Normally the template version should be preferred, but using the macro instead can be necessary, if you want to pass more than 5 parameters to the constructor or if you want to call a private or protected constructor to which your class has (friend-/subclass-)access.
type | the data type of the instance to create |
p | a pointer, in which the macro will store the address of the freshly created instance |
count | the number of the elements to create |
... | optional arguments to pass to the constructor |
#define REALLOCATE_ARRAY | ( | type, | |
p, | |||
count, | |||
... | |||
) |
This is the macro version of the reallocateArray() template function.
Normally the template version should be preferred, but using the macro instead can be necessary, if you want to pass more than 5 parameters to the constructor or if you want to call a private or protected constructor or destructor to which your class has (friend-/subclass-)access.
type | the data type of the instance to create |
p | a pointer, in which the macro will store the address of the freshly created instance |
count | the number of the elements to create |
... | optional arguments to pass to the constructor |
#define DEALLOCATE | ( | type, | |
p | |||
) |
This is the macro version of the deallocate() template function.
Normally the template version should be preferred, but using the macro instead can make sense for consistency reasons when the macro version has been used for allocation or it might be necessary if you want to call a private or protected destructor to which your class has (friend-/subclass-)access.
type | the data type of the instance, to which p points |
p | a pointer to the instance to destroy |
#define DEALLOCATE_ARRAY | ( | type, | |
p | |||
) |
This is the macro version of the deallocateArray() template function.
Normally the template version should be preferred, but using the macro instead can make sense for consistency reasons when the macro version has been used for allocation or it might be necessary if you want to call a private or protected destructor to which your class has (friend-/subclass-)access.
type | the data type of the instance, to which p points |
p | a pointer to the instance to destroy |