Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add a definition for RAII

...

Anchor
one definition rule
one definition rule
Anchor
odr
odr

one-definition rule (ODR) [ISO/IEC 14882-2014]
A fundamental C++ rule that states that no translation unit shall contain more than one definition of any variable, function, class type, enumeration type or template, and that every program shall contain exactly one definition of every non-inline function or variable. Some definitions may be duplicated in multiple translation units, subject to strict rules.

Anchor
RAII
RAII

RAII (Resource Acquisition Is Initialization)

An acronym that stands for: Resource Acquisition Is Initialization. Holding a resource is a class invariant where the allocation of the resource (acquisition) is inseparable from the initialization of the object during its construction. Further, deallocation of the resource is performed during the destruction of the object. Thus, the resource is held when initialization completes and remains held until finalization begins, ensuring there are no resource leaks unless the object owning the resource is also leaked.

Anchor
reentrant
reentrant

reentrant [Dowd 06]
A function is reentrant if multiple instances of the same function can run in the same address space concurrently without creating the potential for inconsistent states.

...