
[Mathias Gaunard]
std::shared_ptr is probably optimized for empty or default deleters.
In VC10 and VC11, shared_ptr has five control blocks: * vanilla * custom deleter * custom deleter and custom allocator * make_shared * allocate_shared Each is optimally sized (in particular, make_shared/allocate_shared implement the "we know where you live" optimization that I have previously described in an attempt to get Boost to pick it up), except that we don't special-case empty custom deleters/allocators. In VC11, we've introduced such special-casing for container allocators/comparators, but we haven't had time to extend it to shared_ptr. I've made a note to myself to do this in the future. (VC9 SP1 was so long ago - as I recall, it had the first three control blocks, but lacked make_shared/allocate_shared due to the absence of rvalue references.) Stephan T. Lavavej Visual C++ Libraries Developer