Terrible memory managment there and C++11 clang problems