Lumiera  0.pre.03
»edit your freedom«
ZombieCheck Class Reference

#include "lib/zombie-check.hpp"

Description

Automatic lifecycle tracker, to produce an alarm when accessing objects after deletion.

Warning
ensure the ZombieCheck instance lives in static memory, otherwise it won't work.

Definition at line 59 of file zombie-check.hpp.

Public Member Functions

 ZombieCheck (string id)
 install a zombie check, tagged with the given id. More...
 
 operator bool () const
 
void operator() () const
 

Private Member Functions

string buildDiagnosticMessage () const
 

Private Attributes

bool deceased_ = false
 
char zombieID_ [42] {}
 

Constructor & Destructor Documentation

◆ ZombieCheck()

ZombieCheck ( string  id)
inline

install a zombie check, tagged with the given id.

When invoked after death, the raised error::Fatal includes this ID in the diagnostic message.

Remarks
recommended to use util::typeStr

Definition at line 71 of file zombie-check.hpp.

+ Collaboration diagram for ZombieCheck:

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