
23 Sep
2011
23 Sep
'11
1:08 p.m.
On Fri, Sep 23, 2011 at 2:03 PM, Sebastian Redl <sebastian.redl@getdesigned.at> wrote:
I was wondering why shared_ptr/array include both a ptr to the control block and a ptr to the data (ptr) in the class itself. I assume it's for performance reasons, but I didn't find anything about that in the docs.
It's for aliasing. You can have a shared_ptr that points to a subobject of the object controlled by the control block.
Ah, of course. Does that apply to shared_array too? Olaf