
27 Jul
2006
27 Jul
'06
12:37 a.m.
For pimpl, I personally use boost::shared_ptr. Sure it has the "overhead" of the control block, but since how you implement pimpl is (duh!) an implementation detail, shared_ptr is perfect for a default implementation. So if I need to, I can simply convert it to a raw pointer later. But consider that the object the shared_ptr points to is usually rather complex, and therefore the additional space requirements to store the shared_ptr control block are unlikely to cause problems. --Emil