Subject: Re: [boost] [ptr_container] ptr_vector across DLL boundaries
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-06-25 10:41:03
Robert Dailey skrev:
> Any help on this?
> On Tue, Jun 23, 2009 at 3:20 PM, Robert Dailey <rcdailey_at_[hidden]> wrote:
>> I forgot to mention that I'm on Windows. But this, of course, would need to
>> be portable.
>> On Tue, Jun 23, 2009 at 3:16 PM, Robert Dailey <rcdailey_at_[hidden]> wrote:
>>> Suppose I have a DLL that allocates a few objects and places them in a
>>> ptr_vector. I then pass this ptr_vector to my executable via a move
>>> operation (basically a swap, not a copy). The executable would keep the
>>> ptr_vector by value and eventually delete it when it falls out of scope.
>>> Is there any danger in doing this? My goal is to make sure that the same
>>> memory manager is used to delete the items as was used to create them.
Do you think a stateful custom clone_allocator would allow you to do
what you want?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk