Forget memory pool and just use unique_ptr.