/**
* Pointer to the array of local elements of this vector.
+ *
+ * Because we allocate these arrays via Utilities::System::posix_memalign,
+ * we need to use a custom deleter for this object that does not call
+ * <code>delete[]</code>, but instead calls @p free().
*/
- std::unique_ptr<Number[]> values;
+ std::unique_ptr<Number[], void (*)(void *)> values;
/**
* For parallel loops with TBB, this member variable stores the affinity
:
partitioner (new Utilities::MPI::Partitioner()),
allocated_size (0),
- values (nullptr)
+ values (nullptr, &free)
{
reinit(0);
}
:
Subscriptor(),
allocated_size (0),
- values (nullptr),
+ values (nullptr, &free),
vector_is_ghosted (false)
{
reinit (v, true);
const MPI_Comm communicator)
:
allocated_size (0),
- values (nullptr),
+ values (nullptr, &free),
vector_is_ghosted (false)
{
reinit (local_range, ghost_indices, communicator);
const MPI_Comm communicator)
:
allocated_size (0),
- values (nullptr),
+ values (nullptr, &free),
vector_is_ghosted (false)
{
reinit (local_range, communicator);
Vector<Number>::Vector (const size_type size)
:
allocated_size (0),
- values (nullptr),
+ values (nullptr, &free),
vector_is_ghosted (false)
{
reinit (size, false);
Vector (const std::shared_ptr<const Utilities::MPI::Partitioner> &partitioner)
:
allocated_size (0),
- values (nullptr),
+ values (nullptr, &free),
vector_is_ghosted (false)
{
reinit (partitioner);