On Thu, Aug 13, 2015 at 10:28 AM, Jeffrey Walton <noloa...@gmail.com> wrote: > > And converting the file-scoped globals into locals with accessors > suffers the same problem on the destructor side.
Not true. The C++ spec guarantees destructors will run in the opposite order of constructors in most cases. The Meyers Singleton is such a case. (So are global objects, incidentally. Global construction order is unspecified, but whatever the order is, global destruction order is guaranteed to be the opposite.) - Pat ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users