mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-11-10 01:10:32 +00:00
cleanup memrory pools if no more streams
This commit is contained in:
parent
afad405ed9
commit
c10ee59de3
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2021, The PurpleI2P Project
|
* Copyright (c) 2013-2022, The PurpleI2P Project
|
||||||
*
|
*
|
||||||
* This file is part of Purple i2pd project and licensed under BSD3
|
* This file is part of Purple i2pd project and licensed under BSD3
|
||||||
*
|
*
|
||||||
@ -1273,6 +1273,11 @@ namespace stream
|
|||||||
m_IncomingStreams.erase (stream->GetSendStreamID ());
|
m_IncomingStreams.erase (stream->GetSendStreamID ());
|
||||||
if (m_LastStream == stream) m_LastStream = nullptr;
|
if (m_LastStream == stream) m_LastStream = nullptr;
|
||||||
}
|
}
|
||||||
|
if (m_Streams.empty ())
|
||||||
|
{
|
||||||
|
m_PacketsPool.CleanUp ();
|
||||||
|
m_I2NPMsgsPool.CleanUp ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StreamingDestination::DeleteStream (uint32_t recvStreamID)
|
bool StreamingDestination::DeleteStream (uint32_t recvStreamID)
|
||||||
|
Loading…
Reference in New Issue
Block a user