LightsprintSDK 2021.08.08
rr::RRUniformlyAllocated Class Reference

#include <RRMemory.h>

Inheritance diagram for rr::RRUniformlyAllocated:
rr::RRAligned rr::RRColorSpace rr::RRLight rr::RRString rr::RRUniformlyAllocatedNonCopyable rr_gl::UberProgram rr::RRAlignedNonCopyable rr::RRRay rr::RRBuffer rr::RRLightField rr::RRMaterial rr::RRMesh rr::RRObject rr::RRObjectIllumination rr::RRReporter rr::RRScene rr::RRSolver rr_gl::Program rr_gl::Renderer rr_gl::Texture

Public Member Functions

void * operator new (std::size_t n)
 
void * operator new[] (std::size_t n)
 
void operator delete (void *p, std::size_t n)
 
void operator delete[] (void *p, std::size_t n)
 

Detailed Description

When used as base class, delete works correctly without regard who calls it.

Ensures that delete doesn't corrupt heap in environment with multiple heaps.

Member Function Documentation

◆ operator new()

void * rr::RRUniformlyAllocated::operator new ( std::size_t  n)

Allocates space for instance of any derived class.

◆ operator new[]()

void * rr::RRUniformlyAllocated::operator new[] ( std::size_t  n)

Allocates space for array of instances of any derived class.

◆ operator delete()

void rr::RRUniformlyAllocated::operator delete ( void *  p,
std::size_t  n 
)

Frees space allocated by new.

◆ operator delete[]()

void rr::RRUniformlyAllocated::operator delete[] ( void *  p,
std::size_t  n 
)

Frees space allocated by new[].