CircuitICNDocument::~CircuitICNDocument() { // Go to hell, KtlQCanvas. I'm in charge of what gets deleted. KtlQCanvasItemList all = m_canvas->allItems(); const KtlQCanvasItemList::Iterator end = all.end(); for ( KtlQCanvasItemList::Iterator it= all.begin(); it != end; ++it ) (*it)->setCanvas(0l); // Remove all items from the canvas selectAll(); deleteSelection(); // Delete anything that got through the above couple of lines ConnectorList connectorsToDelete = m_connectorList; connectorsToDelete.clear(); const ConnectorList::iterator connectorListEnd = connectorsToDelete.end(); for ( ConnectorList::iterator it = connectorsToDelete.begin(); it != connectorListEnd; ++it ) delete *it; deleteAllNodes(); }
DLinkedList<T>::~DLinkedList() { deleteAllNodes(); }
BayesNet::~BayesNet() { deleteAllNodes(); }