Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::ScopedAllocTag Class Reference

Sets the calling thread's AllocTag for the lifetime of the scope, restoring the previous one on exit so guards nest. More...

#include "donner/base/HeapSizeHistogram.h"

Public Member Functions

 ScopedAllocTag (AllocTag tag)
 Push tag as the calling thread's current tag.
 ~ScopedAllocTag ()
 Restore the tag that was current when this guard was constructed.
 ScopedAllocTag (const ScopedAllocTag &)=delete
ScopedAllocTagoperator= (const ScopedAllocTag &)=delete
 ScopedAllocTag (ScopedAllocTag &&)=delete
ScopedAllocTagoperator= (ScopedAllocTag &&)=delete

Detailed Description

Sets the calling thread's AllocTag for the lifetime of the scope, restoring the previous one on exit so guards nest.

Innermost wins: a guard inside a frame stage names the finer owner, and the stage keeps everything the finer guards did not claim. Compiles to nothing without DONNER_HEAP_SIZE_HISTOGRAM.


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