DEKI/ENGINE docs
Deki 0.19.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 <C:/Users/kirby/Documents/Github/deki/deki-editor/deki-editor/include/deki-editor/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, not base pointers, because the EditorUI field helpers store pointers inside objects, such as &obj->x or a field of a component. A set of base pointers would miss those and leave the dangling writes this exists to prevent.

Holds the dying DekiObjects and every Deki::Component they own (a component dies with its object). Plain bytes so Command.h needs no 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: