All STL containers have a member clear() that can be used to erase their content. All STL containers will call this member in their destructor, so you won't have to do it manually. So all you have to do is to ensure that the queue itself is destroyed. for dynamically (with new) allocated objects, that's done by invoking delete: delete myqueue;.
That said: I find it dubious that you would want to create a queue dynamically, instead of making it an ordinary class member:
class myclass {
public:
// whatever
private:
std::queue<int> myqueue_;
};
(Note that std::queue will always allocate memory for its content dynamically, even yif the queue itself is not dynamically allocated.)
If you have to absolutely create the queue dynamically, make sure you're following the Rule of Three. The crash you describe is what might happen when you copy around classes with dynamically allocated objects that don't have a copy constructor/assignment operator.