Mark&sweep garbage collector for C++