Remove duplicate destructor

Destructor of base class GenericVector calls base class clear()
method, deallocating the memory.
This commit is contained in:
Philipp Nordhus 2016-06-17 02:31:20 +02:00
parent 034d666e7a
commit c05ff3456e

View File

@ -368,14 +368,6 @@ struct DawgPosition {
class DawgPositionVector : public GenericVector<DawgPosition> {
public:
/// Overload destructor, since clear() does not delete data_[] any more.
~DawgPositionVector() {
if (size_reserved_ > 0) {
delete[] data_;
size_used_ = 0;
size_reserved_ = 0;
}
}
/// Overload clear() in order to avoid allocating/deallocating memory
/// when clearing the vector and re-inserting entries into it later.
void clear() { size_used_ = 0; }