1
0
Fork 0

Remove some unnecessary and fatal destructors.

This commit is contained in:
Max Neunhoeffer 2014-09-29 08:42:30 +02:00
parent d53da7ce4a
commit 8fbe9bda98
2 changed files with 2 additions and 43 deletions

View File

@ -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;
}
}
////////////////////////////////////////////////////////////////////////////////

View File

@ -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 ();