An example mark-and-sweep garbage collector in 50 lines of C++