[Uml-devel] KDE/kdesdk/umbrello/umbrello

Ralf Habacker ralf.habacker at gmail.com
Sat Dec 17 22:20:03 UTC 2011


SVN commit 1268980 by habacker:

memory leak fix

 M  +3 -1      umldoc.cpp  


--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #1268979:1268980
@@ -140,7 +140,7 @@
  */
 void UMLDoc::createDatatypeFolder()
 {
-    // FIXME: memory leak ?
+    delete m_datatypeRoot;
     m_datatypeRoot = new UMLFolder("Datatypes", "Datatypes");
     m_datatypeRoot->setLocalName(i18n("Datatypes"));
     m_datatypeRoot->setUMLPackage(m_root[Uml::ModelType::Logical]);
@@ -153,6 +153,7 @@
  */
 UMLDoc::~UMLDoc()
 {
+    delete m_datatypeRoot;
     delete m_pChangeLog;
     m_pChangeLog = 0;
 }
@@ -347,6 +348,7 @@
         }
         // Restore the datatype folder, it has been deleted above.
         createDatatypeFolder();
+        // this creates to much items only Logical View should be created
         listView->init();
         /* Remove any stereotypes.
         if (m_stereoList.count() > 0) {




More information about the umbrello-devel mailing list