Skip to content
Snippets Groups Projects
Commit a6d830a8 authored by Markus Blatt's avatar Markus Blatt
Browse files

Forgot to delete dynamically allocated memory in destructor.

[[Imported from SVN: r2489]]
parent 2a7d1fcd
No related branches found
No related tags found
No related merge requests found
......@@ -1133,6 +1133,17 @@ namespace Dune {
template<typename T>
inline void RemoteIndices<T>::free()
{
typedef typename RemoteIndexMap::iterator Iterator;
Iterator lend = remoteIndices_.end();
for(Iterator lists=remoteIndices_.begin(); lists != lend; ++lists) {
if(lists->second.first==lists->second.second) {
// there is only one remote index list.
delete lists->second.first;
}else{
delete lists->second.first;
delete lists->second.second;
}
}
remoteIndices_.clear();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment