title: Clarification on lists and removing elements
body: <p>If I have a <code>list&lt;object*&gt;&gt;* queue</code> and want to pop the first object in the list and hand it over to another part of the program, is it correct to use (sketchy code):</p>
  
  <pre><code>object* objPtr = queue-&gt;first();
  queue-&gt;pop_first();
  return objPtr;  // is this a pointer to a valid memory address now?
  </code></pre>
  
  <p>?</p>
  
  <p>According to the documentation on <a href="http://www.cplusplus.com/reference/stl/list/pop_front/" rel="nofollow noreferrer">http://www.cplusplus.com/reference/stl/list/pop_front/</a> it calls the destructor of the deleted element, but I'm confused as to whether it means the linked list's node object, or the actually stored "user" object.</p>
  
  <p>Edit: I might be <code>front</code> instead of <code>first</code>,  my bad.</p>