mirror of https://gitee.com/bigwinds/arangodb
Remove some unnecessary and fatal destructors.
This commit is contained in:
parent
d53da7ce4a
commit
8fbe9bda98
|
@ -680,10 +680,6 @@ EnumerateCollectionBlock::EnumerateCollectionBlock (ExecutionEngine* engine,
|
|||
}
|
||||
|
||||
EnumerateCollectionBlock::~EnumerateCollectionBlock () {
|
||||
if (_collection != nullptr) {
|
||||
delete _collection;
|
||||
_collection = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool EnumerateCollectionBlock::moreDocuments () {
|
||||
|
@ -875,23 +871,10 @@ IndexRangeBlock::IndexRangeBlock (ExecutionEngine* engine,
|
|||
|
||||
IndexRangeBlock::~IndexRangeBlock () {
|
||||
|
||||
if (_collection != nullptr) {
|
||||
delete _collection;
|
||||
_collection = nullptr;
|
||||
}
|
||||
|
||||
for (auto e : _allVariableBoundExpressions) {
|
||||
delete e;
|
||||
}
|
||||
_allVariableBoundExpressions.clear();
|
||||
|
||||
for (auto x : _inVars) {
|
||||
for (auto y : x) {
|
||||
delete y;
|
||||
}
|
||||
x.clear();
|
||||
}
|
||||
_inVars.clear();
|
||||
}
|
||||
|
||||
int IndexRangeBlock::initialize () {
|
||||
|
@ -1849,19 +1832,6 @@ AqlValue EnumerateListBlock::getAqlValue (AqlValue inVarReg) {
|
|||
// --SECTION-- class CalculationBlock
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
CalculationBlock::~CalculationBlock () {
|
||||
|
||||
if (_expression != nullptr) {
|
||||
delete _expression;
|
||||
_expression = nullptr;
|
||||
}
|
||||
|
||||
for (auto x : _inVars) {
|
||||
delete x;
|
||||
}
|
||||
_inVars.clear();
|
||||
}
|
||||
|
||||
int CalculationBlock::initialize () {
|
||||
int res = ExecutionBlock::initialize();
|
||||
|
||||
|
@ -2791,10 +2761,6 @@ ModificationBlock::ModificationBlock (ExecutionEngine* engine,
|
|||
}
|
||||
|
||||
ModificationBlock::~ModificationBlock () {
|
||||
if (_collection != nullptr) {
|
||||
delete _collection;
|
||||
_collection = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -751,10 +751,6 @@ public:
|
|||
}
|
||||
|
||||
~EnumerateListBlock () {
|
||||
if (_collection != nullptr) {
|
||||
delete _collection;
|
||||
_collection = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
int initialize ();
|
||||
|
@ -837,7 +833,8 @@ public:
|
|||
|
||||
}
|
||||
|
||||
~CalculationBlock ();
|
||||
~CalculationBlock () {
|
||||
};
|
||||
|
||||
|
||||
int initialize ();
|
||||
|
@ -910,10 +907,6 @@ public:
|
|||
}
|
||||
|
||||
~SubqueryBlock () {
|
||||
if (_subquery!= nullptr) {
|
||||
delete _subquery;
|
||||
_subquery = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
int initialize ();
|
||||
|
|
Loading…
Reference in New Issue