Class FrameMemory

Class Documentation

class FrameMemory

Public Functions

float *getFloatBuffer(unsigned int size)

Allocates or fetches a buffer with length: size * sizeof(float). Corresponds to “buffer = new float[size]”.

void *getBuffer(unsigned int sizeInByte)

Allocates or fetches a buffer with length: size * sizeof(float). Corresponds to “buffer = new float[size]”.

void returnBuffer(void *buffer)

Returns an allocated buffer back to the global storage for re-use. Corresponds to “delete[] buffer”.

boost::shared_lock<boost::shared_mutex> activateFrame(Frame *frame)
void deactivateFrame(Frame *frame)
void pruneActiveFrames()
void releaseBuffers()

Public Static Functions

FrameMemory &getInstance()

Returns the global instance. Creates it when the method is first called.