|
Boost : |
Subject: Re: [boost] [serialization] Massive failures in develop?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2015-10-17 14:07:10
> a) refinement of codecvt facet lifetime issue.
>
I think this is the issue, you:
* Create the facet as a data member of the archive.
* Imbue it in a locale and then install that locale in the iostream.
Now on destruction:
* The archive is destroyed first, this destructs the locale facet
*that's still in the iostream*.
* The iostream then calls the destructor on an object that's already
been destroyed.
Depending on the virtual function / destructor implementation, you may
or may not see this as an error at runtime.
So I think you need to back up the iostream's locale and restore it in
the archive destructor if you want to go this way.
Apologies if I've misread your code,
HTH, John.
Update: I think I have a fix, testing now...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk