|
From: Patrick J. L. <lop...@gm...> - 2015-08-13 17:39:06
|
On Thu, Aug 13, 2015 at 10:28 AM, Jeffrey Walton <nol...@gm...> 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 |