xoolive / quadtree

Quadtrees – iterate on pairs of neighbours
MIT License
8 stars 3 forks source link

Access to corrupted memory in SmartQuadtree<T>::iterator::operator++() #6

Closed xoolive closed 8 years ago

xoolive commented 8 years ago

The SmartQuadtree<T>::iterator::operator++() works ok for template T = shared_ptr<U> but not in the default case. Indeed, the pointer to (*it) is to refer trashed data (see erase at the end of the block) after a copy of it is included in a different part of the quadtree.