Xemuth Messages: 387 Registered: August 2018 Location: France
Senior Member
Hello Koldo, Thanks a lot for taking time to help me,
Your solution worked even without inherritance of A from MoveableAndDeepCopyOption.
But instead of doing this :
ArrayMap<Upp::String, A> aCopy;
for (int i = 0; i < myArrays.GetCount(); ++i)
aCopy.Add(myArrays.GetKey(i), pick(myArrays[i].clone()));
I'm surprised that ArrayMap don't have a simple function to do this.
However I have a little question, since My clone return a pointer to a static memory object wich is moved to the fresh object created by array,
what happen to this static allocation since I never delete anywhere this memory chunk ? Will it became a memory leak ?