diff --git a/Source/Diagnostics/WarpXOpenPMD.cpp b/Source/Diagnostics/WarpXOpenPMD.cpp index 2259ce4cab4..36827bd316a 100644 --- a/Source/Diagnostics/WarpXOpenPMD.cpp +++ b/Source/Diagnostics/WarpXOpenPMD.cpp @@ -915,8 +915,6 @@ WarpXOpenPMDPlot::SaveRealProperty (ParticleIter& pti, // reconstruct Cartesian positions for RZ simulations // r,z,theta -> x,y,z // If each comp is being written, create a temporary array, otherwise create an empty array. - // Put the code in a block so that the temporaries are cleaned up right away. - { std::shared_ptr const x( new amrex::ParticleReal[(write_real_comp[0] ? numParticleOnTile : 0)], [](amrex::ParticleReal const *p) { delete[] p; } @@ -942,7 +940,6 @@ WarpXOpenPMDPlot::SaveRealProperty (ParticleIter& pti, if (write_real_comp[1]) { getComponentRecord(real_comp_names[1]).storeChunk(y, {offset}, {numParticleOnTile64}); } - } #endif for (auto idx=0; idx