This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Why does solve take naked DirichletBC pointer?

0 votes

Hi Everyone, I'm curious about this function:

void solve(const Equation& equation,
Function& u,
std::vector bcs,
Parameters parameters=empty_parameters);

Is there a reason the DirichletBC pointer not a shared_ptr?

The reason I ask is that arrays of naked pointers like this can be the source of memory leaks in user code.

Thanks!
Dave

asked Jul 6, 2015 by david.bernstein FEniCS User (2,000 points)
...