Navigation
API > API/Runtime > API/Runtime/uLangCore
This allows smart pointers to free object memory they are holding on to Passing the allocator itself to the free function allows allocation from multiple instances of an allocator and returning memory to the appropriate instance it was allocated from
| Name | CAllocatorInstance |
| Type | class |
| Header File | /Engine/Source/Runtime/Solaris/uLangCore/Public/uLang/Common/Memory/Allocator.h |
| Include Path | #include "uLang/Common/Memory/Allocator.h" |
Syntax
class CAllocatorInstance
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
CAllocatorInstance
(
FAllocate Allocate, |
Use the memory address of this object to seed the observer id generator. | uLang/Common/Memory/Allocator.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FAllocate | void *(*)(const CAllocatorInstance *, size_t) | uLang/Common/Memory/Allocator.h | |
| FDeallocate | void(*)(const CAllocatorInstance *, void *) | uLang/Common/Memory/Allocator.h | |
| FReallocate | void *(*)(const CAllocatorInstance *, void *, size_t) | uLang/Common/Memory/Allocator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| _Allocate | FAllocate | uLang/Common/Memory/Allocator.h | ||
| _Deallocate | FDeallocate | uLang/Common/Memory/Allocator.h | ||
| _ObserverIdGenerator | uint32_t | Id generator for observer pointers Kept here so it does not need to be thread safe | uLang/Common/Memory/Allocator.h | |
| _Reallocate | FReallocate | uLang/Common/Memory/Allocator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULANG_FORCEINLINE void * Allocate
(
size_t NumBytes |
uLang/Common/Memory/Allocator.h | ||
ULANG_FORCEINLINE void Deallocate
(
void* Memory |
uLang/Common/Memory/Allocator.h | ||
ULANG_FORCEINLINEEObserverId GenerateObserverId() |
uLang/Common/Memory/Allocator.h | ||
ULANG_FORCEINLINE void * Reallocate
(
void* Memory, |
uLang/Common/Memory/Allocator.h |