lichao
2021-04-09 4e5cb7960ce4e7e66d5190be67426aeca8b55c3d
src/shm.h
@@ -114,6 +114,7 @@
         throw("Error: Not enough memory, can not allocate \"" + name_ + "\"");
      }
   }
   static bool Remove(SharedMemory &shm, const std::string &name) { return shm.destroy<Data>(ObjName(name).c_str()); }
   static Data *Find(SharedMemory &shm, const std::string &name) { return shm.Find<Data>(ObjName(name)); }
   Data *Find(const std::string &name) { return Find(shm_, ObjName(name)); }
   virtual ~ShmObject() {}
@@ -122,7 +123,7 @@
   const Data *data() const { return pdata_; }
   Data *operator->() { return data(); }
   const Data *operator->() const { return data(); }
   bool Remove() { return shm_.destroy<Data>(ObjName(name_).c_str()); }
   bool Remove() { return Remove(shm_, name_); }
};
} // namespace bhome_shm