]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
bugfix: do not delete TClass objects in the dynamic handling of instances
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Jun 2008 19:37:47 +0000 (19:37 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 12 Jun 2008 19:37:47 +0000 (19:37 +0000)
HLT/BASE/AliHLTEsdManager.cxx

index 918c78443157c451b915cea19fc4612f0c6f5c24..485a6a14e3b565c6539e454b76a1e072b8052419 100644 (file)
@@ -72,7 +72,6 @@ AliHLTEsdManager* AliHLTEsdManager::New()
       } else {
        log.Logging(kHLTLogError, "AliHLTEsdManager::New", "ESD handling", "can not create AliHLTEsdManager instance from class descriptor");
       }
-      delete pCl;
     } else {
       log.Logging(kHLTLogError, "AliHLTEsdManager::New", "ESD handling", "can not find AliHLTEsdManager class descriptor");
     }
@@ -89,9 +88,12 @@ void AliHLTEsdManager::Delete(AliHLTEsdManager* instance)
 
   // check if the library is still there in order to have the
   // destructor available
-  TClass* pCl=TClass::GetClass("AliHLTEsdManagerImlementation");
-  if (!pCl) return;
-  delete pCl;
+  TClass* pCl=TClass::GetClass(fgkImplName);
+  if (!pCl) {
+    AliHLTLogging log;
+    log.Logging(kHLTLogError, "AliHLTEsdManager::Delete", "ESD handling", "potential memory leak: libHLTrec library not available, skipping destruction %p", instance);    
+    return;
+  }
 
   delete instance;
 }