Lumiera  0.pre.03
»edit your freedom«
zombie-check.hpp File Reference

Go to the source code of this file.

Description

Detector to set off alarm when (re)using deceased objects.

When implementing services based on static fields or objects, an invocation after static shutdown can not be precluded – be it by re-entrance, be through indirect reference to some dependency within a static function residing in another translation unit. Since typically the values in static storage are not overwritten after invoking the destructor, we may plant an automatic "zombie detector" to give a clear indication of such a policy violation (Lumiera forbids to use dependencies from dtors).

See also
ZombieCheck_test
sync-classlock.hpp
depend.hpp

Definition in file zombie-check.hpp.

#include "lib/error.hpp"
#include <cstring>
#include <string>

Classes

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

Namespaces

 lib
 Implementation namespace for support and library code.