mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
fixed memory leak
This commit is contained in:
parent
778d1afda0
commit
9639ab7f1e
|
@ -10,6 +10,12 @@ namespace i2p
|
||||||
{
|
{
|
||||||
namespace tunnel
|
namespace tunnel
|
||||||
{
|
{
|
||||||
|
TunnelGatewayBuffer::~TunnelGatewayBuffer ()
|
||||||
|
{
|
||||||
|
for (auto it: m_TunnelDataMsgs)
|
||||||
|
DeleteI2NPMessage (it);
|
||||||
|
}
|
||||||
|
|
||||||
void TunnelGatewayBuffer::PutI2NPMsg (const TunnelMessageBlock& block)
|
void TunnelGatewayBuffer::PutI2NPMsg (const TunnelMessageBlock& block)
|
||||||
{
|
{
|
||||||
bool messageCreated = false;
|
bool messageCreated = false;
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace tunnel
|
||||||
public:
|
public:
|
||||||
TunnelGatewayBuffer (uint32_t tunnelID): m_TunnelID (tunnelID),
|
TunnelGatewayBuffer (uint32_t tunnelID): m_TunnelID (tunnelID),
|
||||||
m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0) {};
|
m_CurrentTunnelDataMsg (nullptr), m_RemainingSize (0) {};
|
||||||
|
~TunnelGatewayBuffer ();
|
||||||
void PutI2NPMsg (const TunnelMessageBlock& block);
|
void PutI2NPMsg (const TunnelMessageBlock& block);
|
||||||
const std::vector<I2NPMessage *>& GetTunnelDataMsgs () const { return m_TunnelDataMsgs; };
|
const std::vector<I2NPMessage *>& GetTunnelDataMsgs () const { return m_TunnelDataMsgs; };
|
||||||
void ClearTunnelDataMsgs ();
|
void ClearTunnelDataMsgs ();
|
||||||
|
|
Loading…
Reference in a new issue