CPackedRaster manages trees of STextureQuadNode objects. Those nodes are "linked" to each other via pointers. When a node is deleted, those link pointers are left dangling. When such a dangling pointer is dereferenced, this raises complaints when additional memory access validation (full page heap verification) is enabled.
As a quick workaround, the pointers of the deleted nodes are cached. The cache is checked to avoid dereferencing those dangling pointers.
A better solution, using either std::weak_ptr or automatic unlinking of nodes upon destruction, requires more research.
CPackedRaster
manages trees ofSTextureQuadNode
objects. Those nodes are "linked" to each other via pointers. When a node is deleted, those link pointers are left dangling. When such a dangling pointer is dereferenced, this raises complaints when additional memory access validation (full page heap verification) is enabled. As a quick workaround, the pointers of the deleted nodes are cached. The cache is checked to avoid dereferencing those dangling pointers. A better solution, using eitherstd::weak_ptr
or automatic unlinking of nodes upon destruction, requires more research.