// WHO WHEN WHAT
// --- ---------- ------------------------------------------------------------
// JLH 03/30/2011 Created this file
+// JLH 06/02/2011 Added code to delete objects in this container when they go
+// out of scope
//
#include "container.h"
Container::~Container()
{
+ // No memory leaks!
+ while (objects.size() > 0)
+ {
+ delete objects[0];
+ objects.erase(objects.begin());
+ }
}
/*virtual*/ void Container::Draw(QPainter * painter)