Skip to content

Commit c05ff34

Browse files
committed
Remove duplicate destructor
Destructor of base class GenericVector calls base class clear() method, deallocating the memory.
1 parent 034d666 commit c05ff34

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

dict/dawg.h

-8
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,6 @@ struct DawgPosition {
368368

369369
class DawgPositionVector : public GenericVector<DawgPosition> {
370370
public:
371-
/// Overload destructor, since clear() does not delete data_[] any more.
372-
~DawgPositionVector() {
373-
if (size_reserved_ > 0) {
374-
delete[] data_;
375-
size_used_ = 0;
376-
size_reserved_ = 0;
377-
}
378-
}
379371
/// Overload clear() in order to avoid allocating/deallocating memory
380372
/// when clearing the vector and re-inserting entries into it later.
381373
void clear() { size_used_ = 0; }

0 commit comments

Comments
 (0)