Octtree pointers minimal example Minimal implementation of pointers in a C++ tree without memory leaks and segfaults