Since the classes inheriting from VectorSpaceVector all implement their own
memory management strategies, the destructor of the base class should always be
virtual.
BlockVector (const std::vector<IndexSet> &local_ranges,
const MPI_Comm communicator);
- /**
- * Destructor. Clears memory.
- */
- ~BlockVector ();
-
/**
* Copy operator: fill all components of the vector with the given
* scalar value.
- template <typename Number>
- BlockVector<Number>::~BlockVector ()
- {}
-
-
-
template <typename Number>
BlockVector<Number> &
BlockVector<Number>::operator = (const value_type s)
template <typename InputIterator>
Vector(const InputIterator first, const InputIterator last);
- /**
- * Destructor, deallocates memory.
- */
- virtual ~Vector();
-
/**
* Copies the data of the input vector @p in_vector.
*/
- template <typename Number>
- inline
- Vector<Number>::~Vector() {}
-
-
-
template <typename Number>
inline
typename Vector<Number>::size_type Vector<Number>::size() const
* Return the memory consumption of this class in bytes.
*/
virtual std::size_t memory_consumption() const = 0;
+
+ /**
+ * Destructor. Declared as virtual so that inheriting classes (which may
+ * manage their own memory) are destroyed correctly.
+ */
+ virtual ~VectorSpaceVector();
};
/*@}*/
+
+
+
+#ifndef DOXYGEN
+ // TODO we can get rid of this when we require C++11 by using '=default'
+ // above
+ template <typename Number>
+ inline
+ VectorSpaceVector<Number>::~VectorSpaceVector()
+ {}
+#endif // DOXYGEN
}
DEAL_II_NAMESPACE_CLOSE
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams