Browse Source

fixed memory leak

pull/73/merge
orignal 11 years ago
parent
commit
73ef5e29c2
  1. 6
      TunnelEndpoint.cpp
  2. 1
      TunnelEndpoint.h

6
TunnelEndpoint.cpp

@ -9,6 +9,12 @@ namespace i2p @@ -9,6 +9,12 @@ namespace i2p
{
namespace tunnel
{
TunnelEndpoint::~TunnelEndpoint ()
{
for (auto it: m_IncompleteMessages)
i2p::DeleteI2NPMessage (it.second.data);
}
void TunnelEndpoint::HandleDecryptedTunnelDataMsg (I2NPMessage * msg)
{
m_NumReceivedBytes += TUNNEL_DATA_MSG_SIZE;

1
TunnelEndpoint.h

@ -21,6 +21,7 @@ namespace tunnel @@ -21,6 +21,7 @@ namespace tunnel
public:
TunnelEndpoint (): m_NumReceivedBytes (0) {};
~TunnelEndpoint ();
size_t GetNumReceivedBytes () const { return m_NumReceivedBytes; };
void HandleDecryptedTunnelDataMsg (I2NPMessage * msg);

Loading…
Cancel
Save