c++ class in memory