 <blockquote> <p>(1) <em>The stack is actually only local to expressionParser so I KNOW I can remove the new keyword</em></p> </blockquote> <p><strong>correct</strong></p> <blockquote> <p>(2) <em>Do I HAVE To create a pointer to the queue in this case. If I need to create the pointer, then I should call a delete output in my query function to properly get rid of the queue?</em></p> </blockquote> <p><strong>correct. Here, "creating pointer" doesn't mean again using <code>new</code> and copy all contents. Just assign a pointer to the already created <code>queue&lt;string&gt;</code>. Simply <code>delete output;</code> when you are done with it in your <code>query()</code>.</strong></p> <blockquote> <p>(3) <em>vector being returned by query. Should that be left as I have it or should it be a pointer and what's the difference between them?</em></p> </blockquote> <p><strong>I would suggest either you pass the <code>vector&lt;Line*&gt;</code> by non-const reference to your <code>query()</code> and use it or return a <code>vector&lt;Line*&gt;*</code> from your function. Because difference is, if the vector is huge and return by value then it might copy all its content (considering the worst case without optimization)</strong></p> <blockquote> <p>(4) <em>Once I consume that vector (display the information in it) I need it to be removed from memory, however, the pointers contained in the vector are still good and the items being pointed to by them should not be deleted. What's the best approach in this case?</em></p> </blockquote> <p><strong>Pass the <code>vector&lt;Line*&gt;</code> into the function by reference. And retain it in scope until you need it. Once you are done with pointer members 'Line*<code>inside it, just</code>delete` them</strong></p> <blockquote> <p>(5) <em>What happens to the contents of containers when you call delete on the container? If the container held pointers?</em></p> </blockquote> <p><strong>Nothing happens to the pointer members of the container when it's deleted. You have to explicitly call <code>delete</code> on every member. By the way in your case, you can't <code>delete</code> your <code>vector&lt;Line*&gt;</code> because it's an object not a pointer &amp; when you <code>delete output;</code>, you don't have to worry about contents of <code>queue&lt;&gt;</code> because they are not pointers.</strong></p> <blockquote> <p>(6) <em>Those pointers are deleted won't that affect other areas of my program?</em></p> </blockquote> <p><strong>Deleting a valid pointer (i.e. allocated on heap) doesn't affect your program in any way.</strong></p>