|
Boost Users : |
Subject: Re: [Boost-users] [serialization] custom allocation/deletion
From: Robert Ramey (ramey_at_[hidden])
Date: 2012-06-07 01:45:52
Brian Budge wrote:
> Hi all -
>
> Is there a way to use custom allocation while loading from an archive?
> I'm thinking like passing an allocator along with the archive during
> deserialization?
I'm guessing that this would not be possible without adding a new
customization point to the library. Looks like an oversight to me.
> Adding to this, is it possible to add a custom deleter to a shared_ptr
> during deserialization? I am thinking of using this with boost mpi,
> and if I send a shared_ptr over the wire with some kind of deleter,
> the same deleter object can't be used on the other side since it's in
> a different address space.
I don't think this is true. The new object is created in the new
address space. The object on the "new" side is not the
same object on the "other" side.
Robert Ramey
>
> Thanks,
> Brian
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net