mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
l_LegacyDowntimesCache: delete removed objects not to leak memory
This commit is contained in:
parent
58a10ad312
commit
b3c914242c
@ -148,6 +148,12 @@ void Downtime::Start(bool runtimeCreated)
|
|||||||
|
|
||||||
void Downtime::Stop(bool runtimeRemoved)
|
void Downtime::Stop(bool runtimeRemoved)
|
||||||
{
|
{
|
||||||
|
{
|
||||||
|
std::unique_lock<std::mutex> lock (l_DowntimeMutex);
|
||||||
|
|
||||||
|
l_LegacyDowntimesCache.erase(GetLegacyId());
|
||||||
|
}
|
||||||
|
|
||||||
GetCheckable()->UnregisterDowntime(this);
|
GetCheckable()->UnregisterDowntime(this);
|
||||||
|
|
||||||
Downtime::Ptr parent = GetByName(GetParent());
|
Downtime::Ptr parent = GetByName(GetParent());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user