Sane C++ Libraries
C++ Platform Abstraction Libraries
SC::HeapBuffer Struct Reference

A move-only owned buffer of bytes. More...

#include <HeapBuffer.h>

Public Member Functions

 HeapBuffer (HeapBuffer &&other)
 
 HeapBuffer (const HeapBuffer &other)=delete
 
HeapBufferoperator= (const HeapBuffer &other)=delete
 
HeapBufferoperator= (HeapBuffer &&other)
 
bool allocate (size_t numBytes)
 Allocates numBytes releasing previously allocated memory. More...
 
void release ()
 Releases any previously allocated memory. More...
 

Public Attributes

Span< char > data
 

Detailed Description

A move-only owned buffer of bytes.

Member Function Documentation

◆ allocate()

bool SC::HeapBuffer::allocate ( size_t  numBytes)

Allocates numBytes releasing previously allocated memory.

◆ release()

void SC::HeapBuffer::release ( )

Releases any previously allocated memory.


The documentation for this struct was generated from the following file: