From 4b5de9bafb33a6d6e09cfbf60c95ecfd0d4edaba Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Wed, 9 Aug 2023 12:37:40 -0400 Subject: [PATCH] BUG: close memory test file ofstream after writing Explicitly close the files, flush to disk. --- test/itkOMEZarrNGFFInMemoryTest.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/test/itkOMEZarrNGFFInMemoryTest.cxx b/test/itkOMEZarrNGFFInMemoryTest.cxx index 0c96b93..6cc4082 100644 --- a/test/itkOMEZarrNGFFInMemoryTest.cxx +++ b/test/itkOMEZarrNGFFInMemoryTest.cxx @@ -85,6 +85,7 @@ doTest(const char * inputFileName, const char * outputFileName) std::ofstream oFile(outputFileName, std::ios::binary); oFile.write(bufferInfo.pointer, bufferInfo.size); + oFile.close(); free(bufferInfo.pointer); std::cout << "Test finished" << std::endl;