From 71f7a1aa4d68d63e3ed7ea94295050954a9cbfc4 Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Thu, 23 Feb 2017 20:19:05 +0100 Subject: [PATCH] solved the memory problem, but I dont know how exactly this works... --- src/multi_array_operation.cc | 4 ++-- src/multi_array_operation.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/multi_array_operation.cc b/src/multi_array_operation.cc index 624807a..8b259ff 100644 --- a/src/multi_array_operation.cc +++ b/src/multi_array_operation.cc @@ -11,8 +11,8 @@ namespace MultiArrayTools MultiArrayOperationBase:: MultiArrayOperationBase(MultiArray& ma, const Name& nm) : mArrayRef(ma), - //mIndex(mArrayRef.begin()), - mIibPtr(new IndexType(mArrayRef.begin())), + mIndex(mArrayRef.begin()), + mIibPtr(&mIndex), mNm(nm) { mIibPtr->name(nm); diff --git a/src/multi_array_operation.h b/src/multi_array_operation.h index 261c5f7..fca3f78 100644 --- a/src/multi_array_operation.h +++ b/src/multi_array_operation.h @@ -64,7 +64,7 @@ namespace MultiArrayTools protected: MultiArray& mArrayRef; - //mutable IndexType mIndex; + mutable IndexType mIndex; IndefinitIndexBase* mIibPtr = nullptr; Name mNm; };