Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiEditor::DeadMemory Class Reference

Memory that is about to be freed, described as byte ranges. More...

#include <Command.h>

Public Member Functions

void Add (const void *base, size_t size)
bool Empty () const
bool Contains (const void *ptr) const
 True if ptr falls inside any dying range.
template<typename Container>
bool ContainsAnyIn (const Container &items) const
 True if any element of a container of pointers falls inside a dying range.

Detailed Description

Memory that is about to be freed, described as byte ranges.

Ranges rather than a set of base pointers, because commands do not only store objects — the EditorUI field helpers store interior pointers such as &obj->x or the address of a field inside a component. A base-pointer set would miss every one of those and leave exactly the dangling writes this mechanism exists to prevent.

Populated with the dying DekiObjects and every DekiComponent they own (a component dies with its object). Type-erased to bytes so Command.h stays free of engine headers.

Member Function Documentation

◆ Add()

void DekiEditor::DeadMemory::Add ( const void * base,
size_t size )
inline

◆ Empty()

bool DekiEditor::DeadMemory::Empty ( ) const
inline

◆ Contains()

bool DekiEditor::DeadMemory::Contains ( const void * ptr) const
inline

True if ptr falls inside any dying range.

◆ ContainsAnyIn()

template<typename Container>
bool DekiEditor::DeadMemory::ContainsAnyIn ( const Container & items) const
inline

True if any element of a container of pointers falls inside a dying range.


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