RingBuffer<> is now templated with size, buffer is now static.

This commit is contained in:
Adam Ierymenko 2019-03-22 14:39:52 -07:00
parent af3ec000a0
commit d530356055
6 changed files with 95 additions and 247 deletions

View file

@ -60,11 +60,7 @@ private:
Peer() {} // disabled to prevent bugs -- should not be constructed uninitialized
public:
~Peer() {
Utils::burn(_key,sizeof(_key));
delete _pathChoiceHist;
_pathChoiceHist = NULL;
}
~Peer() { Utils::burn(_key,sizeof(_key)); }
/**
* Construct a new peer
@ -674,7 +670,7 @@ private:
AtomicCounter __refCount;
RingBuffer<int> *_pathChoiceHist;
RingBuffer<int,ZT_MULTIPATH_PROPORTION_WIN_SZ> _pathChoiceHist;
bool _linkIsBalanced;
bool _linkIsRedundant;