I checked VC 7, header file for ofstream, destructor is empty, plus if we
put this in multithread environment, it is necessary to ensure close() is
executed before another thread attempts to access same file, unless
xml_oarchive's destructor itself has a mechanism to close the stream once
entire content is written to stream.
_____
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Robert Ramey
Sent: Saturday, October 22, 2005 8:41 PM
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] When to close ofstream in XML serialize
Just remove the close(). This will permit the xml_archive destructor to be
called while the stream is still open. The xml destructor adds some final
tags to make a valid xml file.
Robert Ramey
"Piyush Kapadia"