digiKam Developer Documentation
Professional Photo Management with the Power of Open Source
Loading...
Searching...
No Matches
Digikam::AbstractMarkerTiler::Tile Class Reference
Inheritance diagram for Digikam::AbstractMarkerTiler::Tile:

Public Member Functions

virtual ~Tile ()
Tile * addChild (const int linearIndex, Tile *tilePointer)
bool childrenEmpty () const
void deleteChild (Tile *const childTile, const int knownLinearIndex=-1)
 Sets the pointer to a child tile to zero and deletes the child.
Tile * getChild (const int linearIndex)
int nextNonEmptyIndex (int linearIndex) const
 returns the next non empty child index or -1.

Constructor & Destructor Documentation

◆ ~Tile()

Digikam::AbstractMarkerTiler::Tile::~Tile ( )
virtual
Note
The destructor must be virtual: tiles are created by the tileNew() factory of the subclasses and are always deleted through Tile pointers (rootTile, ~Tile(), deleteChild()). Making only the subclass destructor virtual moves the Tile subobject to a nonzero offset, so deleting through a Tile pointer frees an interior pointer and crashes. With no virtual destructor at all the subclass destructor is skipped (leaking its members) and C++14 sized deallocation passes the wrong size, which aborts under allocators enforcing it, like hardened_malloc. See bug #522748.