Navigation
Unreal Engine C++ API Reference > Runtime > Core > Memory
References
Module | Core |
Header | /Engine/Source/Runtime/Core/Public/Memory/SharedBuffer.h |
Include | #include "Memory/SharedBuffer.h" |
Syntax
class FUniqueBuffer
Remarks
A reference to a single-ownership mutable buffer.
Ownership can be transferred by moving to FUniqueBuffer or it can be converted to an immutable shared buffer with MoveToShared().
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Construct a null unique buffer. | ||
![]() |
FUniqueBuffer
(
FBufferOwner* Owner |
Construct a unique buffer from a new unreferenced buffer owner. | |
![]() |
FUniqueBuffer
(
FUniqueBuffer&& |
||
![]() |
FUniqueBuffer
(
const FUniqueBuffer& |
Functions
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
FUniqueBuffer | Alloc
(
uint64 Size |
Make an uninitialized owned buffer of the specified size. |
![]() ![]() |
FUniqueBuffer | Clone
(
const void* Data, |
Make an owned clone of the input. |
![]() ![]() |
FUniqueBuffer | Clone
(
FMemoryView View |
Make an owned clone of the input. |
![]() ![]() |
const void * | GetData () |
|
![]() |
void * | GetData () |
Returns a pointer to the start of the buffer. |
![]() ![]() |
uint64 | GetSize () |
Returns the size of the buffer in bytes. |
![]() ![]() |
FMemoryView | GetView () |
|
![]() |
FMutableMemoryView | GetView () |
Returns a view of the buffer. |
![]() ![]() |
bool | Returns true if the referenced buffer has been materialized. | |
![]() ![]() |
bool | IsNull () |
Returns true if this does not point to a buffer owner. |
![]() ![]() |
bool | IsOwned () |
Returns true if this keeps the referenced buffer alive. |
![]() |
FUniqueBuffer | MakeOwned () |
Returns a buffer that is owned, by cloning if not owned. |
![]() ![]() |
FUniqueBuffer | MakeView
(
FMutableMemoryView View |
Make a non-owned view of the input. |
![]() ![]() |
FUniqueBuffer | MakeView
(
void* Data, |
Make a non-owned view of the input. |
![]() ![]() |
void | Materialize () |
Materialize the buffer by making its data and size available. |
![]() |
FSharedBuffer | MoveToShared () |
Convert this to an immutable shared buffer, leaving this null. |
![]() |
void | Reset () |
Reset this to null. |
![]() ![]() |
FUniqueBuffer | TakeOwnership
(
void* Data, |
Make an owned buffer by taking ownership of the input. |
![]() ![]() |
FUniqueBuffer | TakeOwnership
(
void* Data, |
Make an owned buffer by taking ownership of the input. |
Operators
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
Returns true if this points to a buffer owner. | ||
![]() ![]() |
|||
![]() |
|||
![]() ![]() |
bool | operator!=
(
const FUniqueBuffer& BufferB |
|
![]() |
FUniqueBuffer & | operator=
(
FUniqueBuffer&& |
|
![]() |
FUniqueBuffer & | operator=
(
const FUniqueBuffer& |
|
![]() ![]() |
bool | operator==
(
const FUniqueBuffer& BufferB |
Typedefs
Name | Description |
---|---|
FOwnerPtrType |