PStack  2.0
Stack trace printer for MSVC and GCC binaries
psystem::stack_allocated Struct Reference

Disable heap allocation and deallocation. More...

#include <stack_allocated.hpp>

Inheritance diagram for psystem::stack_allocated:

Overloaded Operators

static void operator delete (void *)=delete
 Individual object deletion.
static void operator delete[] (void *)=delete
 Array of type object deletion.
static void * operator new (size_t)=delete
 Individual object allocation.
static void * operator new[] (size_t)=delete
 Array of type allocation.

Detailed Description

Disable heap allocation and deallocation.

This is a zero-overhead base-class for deleting the various heap-based allocation operators. This way a class can declare its intent without having to tediously delete all the operators. Of course, operators can be reintroduced further down the class heirarchy.

The most obvious case for a stack_allocated object type is some kind of RAII object that manages a resource, and attempts to do so solely within the a single scope (e.g., std::lock_guard).

Matt Bisson
21 August, 2014
PSystem 2.0
PSystem 2.0

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