/* --------------------- inline functions ---------------------- */
+template <typename VECTOR>
+inline
+GrowingVectorMemory<VECTOR>::Pool::Pool()
+ :
+ data(0)
+{}
+
+
+
+template <typename VECTOR>
+inline
+GrowingVectorMemory<VECTOR>::Pool::~Pool()
+{
+ // Nothing to do if memory was unused.
+ if (data == 0) return;
+
+ // First, delete all remaining
+ // vectors. Actually, there should
+ // be none, if there is no memory
+ // leak
+ unsigned int n=0;
+ for (typename std::vector<entry_type>::iterator i=data->begin();
+ i != data->end();
+ ++i)
+ {
+ if (i->first == true)
+ ++n;
+ delete i->second;
+ }
+ delete data;
+}
+
+
+template <typename VECTOR>
+inline
+void
+GrowingVectorMemory<VECTOR>::Pool::initialize(const unsigned int size)
+{
+ if (data == 0)
+ {
+ data = new std::vector<entry_type>(size);
+
+ for (typename std::vector<entry_type>::iterator i= data->begin();
+ i != data->end();
+ ++i)
+ {
+ i->first = false;
+ i->second = new VECTOR;
+ }
+ }
+}
+
+
template <typename VECTOR>
inline
GrowingVectorMemory<VECTOR>::GrowingVectorMemory (const unsigned int initial_size,
DEAL_II_NAMESPACE_OPEN
-template <typename VECTOR>
-GrowingVectorMemory<VECTOR>::Pool::Pool()
- :
- data(0)
-{}
-
-
-
-template <typename VECTOR>
-GrowingVectorMemory<VECTOR>::Pool::~Pool()
-{
- // Nothing to do if memory was unused.
- if (data == 0) return;
-
- // First, delete all remaining
- // vectors. Actually, there should
- // be none, if there is no memory
- // leak
- unsigned int n=0;
- for (typename std::vector<entry_type>::iterator i=data->begin();
- i != data->end();
- ++i)
- {
- if (i->first == true)
- ++n;
- delete i->second;
- }
- delete data;
-}
-
-
-template <typename VECTOR>
-void
-GrowingVectorMemory<VECTOR>::Pool::initialize(const unsigned int size)
-{
- if (data == 0)
- {
- data = new std::vector<entry_type>(size);
-
- for (typename std::vector<entry_type>::iterator i= data->begin();
- i != data->end();
- ++i)
- {
- i->first = false;
- i->second = new VECTOR;
- }
- }
-}
-
-
template <typename VECTOR>
typename GrowingVectorMemory<VECTOR>::Pool GrowingVectorMemory<VECTOR>::pool;