Delete ME after writing

@Dr15Jones 
this should address the comment you made to #5650

comments are welcome.. :)

ciao,
F.
You must change ```data_.flags``` to be a ```std::atomic<bool>``` since you are modifying it simultaneously.