-// Copyright (C) 2016 CEA/DEN, EDF R&D
+// Copyright (C) 2016-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
med_memfile memfile=MED_MEMFILE_INIT;
memfile.app_image_ptr=db->getPointer();
memfile.app_image_size=db->getNbOfElems();
- MEDFileUtilities::AutoFid fid(MEDmemFileOpen(MEDCoupling::MEDFileWritableStandAlone::DFT_FILENAME_IN_MEM,&memfile,MED_FALSE,MED_ACC_RDONLY));
+ std::string dftFileName(MEDCoupling::MEDFileWritableStandAlone::GenerateUniqueDftFileNameInMem());
+ MEDFileUtilities::AutoFid fid(MEDmemFileOpen(dftFileName.c_str(),&memfile,MED_FALSE,MED_ACC_RDWR));
return T::New(fid);
}