mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 14:41:36 +08:00
Remove duplicate destructor
Destructor of base class GenericVector calls base class clear() method, deallocating the memory.
This commit is contained in:
parent
034d666e7a
commit
c05ff3456e
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user