hhellyer added a comment.

In http://reviews.llvm.org/D20565#444507, @clayborg wrote:

> My main reason for making sure we use std::unique_ptr is for API 
> compatibility in the future. The size of std::unique_ptr and std::shared_ptr 
> differs and if anyone wrote an IDE or tool that links against the LLDB public 
> API, then we can't switch the layout of a class without breaking our ABI. So 
> it is safest to go with a std::unique_ptr since the backing class is so 
> simple and isn't expensive to copy.


That's reasonable, the objects themselves aren't so large or numerous that not 
sharing them will make much difference even if we don't ever need to modify 
them.
SBMemoryRegionInfoList was already using a unique_ptr to hold a reference to 
its impl object so that didn't need updating.


http://reviews.llvm.org/D20565



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to