|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-11-18 08:53:40
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk