
On Thu, Jun 25, 2009 at 9:41 AM, Thorsten Ottosen < thorsten.ottosen@dezide.com> wrote:
Do you think a stateful custom clone_allocator would allow you to do what you want?
Could you elaborate a bit on what you mean? What state would you give to clone_allocator? Keep in mind that clone_allocator needs to, at some point, be implemented IN the DLL itself, otherwise the correct 'delete' will not be called. Some sort of polymorphism would solve this, that's the most obvious solution I can think of. Either that, or instead of a functor, take a boost::function, and that way I can pass you a function pointer to call for clone allocation/deallocation. There's several easy ways of solving this particular issue that I can see. But I would be interested in hearing more about the idea you have. I'm not sure I fully understand just yet.