title: std::list<shared_ptr<Shape*>> pLShape?
body: <p>I have a question and that is that in List, vector and/or shared_ptr/unique_ptr you can pass classes as objects as well as pointers.
  I do not understand now when one would use e.g shared_ptr&lt;Shape*&gt; pShape;?
  When does it make sense to pass e.g. in the case the class Shape as a pointer and when not?</p>
  <pre><code>#define _CRTDBG_MAP_ALLOC 
  #include &lt;stdlib.h&gt; 
  #include &lt;crtdbg.h&gt; 
  #include &lt;iostream&gt; 
  #include &quot;CAD_Drawing.h&quot; 
  
  
  ...
  
  void CAD::CAD_Drawing::vDrawIt(void)
  {
      for (auto it : CAD::CAD_Drawing::setShapes_)
      {
          it-&gt;vDraw();
  
      }
  }
  void CAD::CAD_Drawing::vAddShape(std::shared_ptr&lt;Shape&gt; pShape)
  {
      setShapes_.insert(pShape);
      
  }
  
  void CAD::CAD_Drawing::vRemoveShape(std::shared_ptr&lt;Shape&gt; pShape)
  {
      setShapes_.erase(pShape);
  }
  </code></pre>