use unique_ptr for sent fragments

This commit is contained in:
orignal 2015-01-30 20:30:39 -05:00
parent 79087f6942
commit 618abd6320
2 changed files with 5 additions and 9 deletions

View file

@ -6,6 +6,7 @@
#include <map>
#include <vector>
#include <set>
#include <memory>
#include <boost/asio.hpp>
#include "I2NPProtocol.h"
#include "Identity.h"
@ -65,11 +66,9 @@ namespace transport
struct SentMessage
{
std::vector<Fragment *> fragments;
std::vector<std::unique_ptr<Fragment> > fragments;
uint32_t nextResendTime; // in seconds
int numResends;
~SentMessage () { for (auto it: fragments) { delete it; }; };
};
class SSUSession;