
18 Nov
2004
18 Nov
'04
1:53 p.m.
Peter Petrov wrote:
Peter Dimov <pdimov <at> mmltd.net> writes:
The registry is not meant to outlive the deserialization process.
How can you define the lifetime of the deserialization process?
IIUC, the registry ought to live at least for as long as the archive from which we deserialize. The archive, in turn, may well live during the entire lifetime of the application (for example, if it is bound to a pipe).
This has never been a problem for me, because I haven't encountered the need for an infinite archive. An infinite archive that contains shared_ptr instances should, in fact, keep the objects alive forever: - read shared_ptr #28, along with the object - reset() the shared_ptr read above - read shared_ptr sharing ownership with #28