VS2010's concurency runtime and unbounded_buffer<shared_ptr<T>>, any pitfalls?
问题 I want to pass heap-allocated objects from a dll. Obviously, memory must be managed correctly. Does anyone see a problem with the following cunning scheme I devised: unbounded_buffer<shared_ptr<T>> buf; I am aware that shared_ptr stashes away a deleter for the contained object, so using it alone across dll boundaries shouldn't be a problem. 回答1: Here's what I received from MSFT regarding the issue: Yes, you can use the message blocks (like unbounded_buffer) on thread that are manually created