From bad18f2aced87fbfa56a1648f93c9b01542cf643 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Fri, 19 Dec 2008 12:19:53 +0000 Subject: [PATCH] Bug 1299: Generate an error when trying to use a MultiDimArray copy constructor. --- RTCP/Interface/include/Interface/MultiDimArray.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RTCP/Interface/include/Interface/MultiDimArray.h b/RTCP/Interface/include/Interface/MultiDimArray.h index fdd8c4b80d0..2ae51a5735d 100644 --- a/RTCP/Interface/include/Interface/MultiDimArray.h +++ b/RTCP/Interface/include/Interface/MultiDimArray.h @@ -64,6 +64,12 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar private: Allocator &allocator; + // don't allow copy constructors -- they are not yet implemented + // the default boost implementation just copies the pointers + // to the data area, resulting in a double free when deallocating + // both copies. + MultiDimArray( const MultiDimArray<T,DIM> &other ); + static size_t nrElements(const ExtentList &extents) { size_t size = 1; -- GitLab