Why do you say that?  The destructor is exactly where you need to call flush.