mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 03:23:04 +01:00
Avoid unnecessary operations in the destructor. This also prevents possible hangs in Classic builds.
This commit is contained in:
parent
675e7e0171
commit
a9923c92af
@ -133,13 +133,20 @@ MonitoringData::MonitoringData(const Database* dbb)
|
||||
|
||||
MonitoringData::~MonitoringData()
|
||||
{
|
||||
Guard guard(this);
|
||||
m_sharedMemory->mutexLock();
|
||||
|
||||
if (m_sharedMemory->getHeader() &&
|
||||
m_sharedMemory->getHeader()->used == alignOffset(sizeof(Header)))
|
||||
try
|
||||
{
|
||||
m_sharedMemory->removeMapFile();
|
||||
if (m_sharedMemory->getHeader() &&
|
||||
m_sharedMemory->getHeader()->used == alignOffset(sizeof(Header)))
|
||||
{
|
||||
m_sharedMemory->removeMapFile();
|
||||
}
|
||||
}
|
||||
catch (const Exception&)
|
||||
{} // no-op
|
||||
|
||||
m_sharedMemory->mutexUnlock();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user