add static function to remove shared memory

This commit is contained in:
Dennis Luxen 2013-10-08 15:47:43 +02:00
parent 5afed2d396
commit aaec0e641b

View File

@ -137,6 +137,15 @@ public:
return RegionExists(key);
}
template<typename IdentifierT >
static void RemoveSharedMemory(
const IdentifierT id
) {
OSRMLockFile lock_file;
boost::interprocess::xsi_key key( lock_file().string().c_str(), id );
RemoveSharedMemory(key);
}
private:
static bool RegionExists( const boost::interprocess::xsi_key &key ) {
bool result = true;