C++ wrapper for keeping things in shared memory