--- At Mon, 17 Oct 2005 20:00:45 +0200, nadir amra (JIRA) wrote: > [ http://issues.apache.org/jira/browse/AXISCPP-343? >page=comments#action_12332263 ] > >nadir amra commented on AXISCPP-343: >------------------------------------ > >Not sure if exact problem - but test cases are failing. > >The way arrays are handled in general is problematic and needs to be >redesigned. I was never comfortable with memcpy/memset of objects >because it is not good coding practice, but it did work on OS/400. > >But what is currently being done is equally bad. > >I am not that familiar with the code to understand what exactly needs to >change to make this a cleaner implementation. > >Probably the quickest resolution to this would be the use of copy >constructors - where one would loop through and assign each object to >the other object in the array. > >More optimal solution would be to use some sort of AXISCPP-created >container in the future so we do not have to recreate an array?
Take a look at a typical implementation of std:vector for the correct way to copy objects. In a word, yes, you should be using copy/ assignment. You can also make optimizations if you can identify the array members as a POD type (plain old data). ...Duane
