diff --git a/Modules/Core/Common/test/itkFixedArrayTest2.cxx b/Modules/Core/Common/test/itkFixedArrayTest2.cxx index af603bb78477..6206d29a8f25 100644 --- a/Modules/Core/Common/test/itkFixedArrayTest2.cxx +++ b/Modules/Core/Common/test/itkFixedArrayTest2.cxx @@ -38,11 +38,7 @@ itkFixedArrayTest2(int, char *[]) // Declare an array of nelements FixedArray // and add a small margin to play with pointers // but not map outside the allocated memory - auto * vec = new ArrayType[nelements + 8]; - - // Fill it up with zeros - memset(vec, 0, (nelements + 8) * sizeof(ArrayType)); - + auto * vec = new ArrayType[nelements + 8](); // Display the alignment of the array std::cout << "Initial alignment: " << (((size_t)vec) & 7) << '\n'; diff --git a/Modules/IO/GE/src/itkGE5ImageIO.cxx b/Modules/IO/GE/src/itkGE5ImageIO.cxx index 2f06e5bae693..cb062050499e 100644 --- a/Modules/IO/GE/src/itkGE5ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIO.cxx @@ -180,8 +180,7 @@ GE5ImageIO::ReadHeader(const char * FileNameToRead) << "Reason: " << reason); } - curImage = new GEImageHeader; - memset(curImage, 0, sizeof(GEImageHeader)); + curImage = new GEImageHeader(); std::ifstream f; this->OpenFileForReading(f, FileNameToRead);