Skip to content
Snippets Groups Projects
Commit 98305f9d authored by Oliver Sander's avatar Oliver Sander
Browse files

Replace a C pointer by a std::unique_ptr

Simplifies the memory management.
parent 897682a6
No related branches found
No related tags found
1 merge request!49Replace a C pointer by a std::unique_ptr
Pipeline #
......@@ -93,7 +93,7 @@ namespace Dune
void checkInterface(const IS& source,
const IS& target, MPI_Comm comm)
{
RemoteIndices<IS> *ri=new RemoteIndices<IS>(source, target, comm);
auto ri = std::make_unique<RemoteIndices<IS> >(source, target, comm);
ri->template rebuild<true>();
Interface inf;
typename OwnerOverlapCopyCommunication<int>::OwnerSet flags;
......@@ -113,11 +113,8 @@ namespace Dune
std::cout<<rank<<": redist interface :"<<interface<<std::endl;
throw "autsch!";
delete ri;
}else
}
#endif
delete ri;
}
void setSetup()
{
......
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