From 28a2dcbdb862e4d331b58f0fc368a67fbe8c381e Mon Sep 17 00:00:00 2001 From: ptv Date: Wed, 5 Jul 2006 09:44:20 +0000 Subject: [PATCH] remove memory leak on myFormats QPtrList --- src/Qtx/QtxResourceMgr.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Qtx/QtxResourceMgr.cxx b/src/Qtx/QtxResourceMgr.cxx index d5b3e3a6f..736e74137 100644 --- a/src/Qtx/QtxResourceMgr.cxx +++ b/src/Qtx/QtxResourceMgr.cxx @@ -879,9 +879,11 @@ QtxResourceMgr::~QtxResourceMgr() QStringList prefList = myTranslator.keys(); for ( QStringList::const_iterator it = prefList.begin(); it != prefList.end(); ++it ) removeTranslators( *it ); - for ( ResListIterator it( myResources ); it.current(); ++it ) - delete it.current(); + for ( ResListIterator resIt( myResources ); resIt.current(); ++resIt ) + delete resIt.current(); myResources.clear(); + for ( FormatListIterator formIt( myFormats ); formIt.current(); ++formIt ) + delete formIt.current(); } /*! -- 2.39.2