Techincal fix related to the ownership of the OCDB entry. The problem was spotted...
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jul 2009 09:57:40 +0000 (09:57 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 8 Jul 2009 09:57:40 +0000 (09:57 +0000)
STEER/AliCDBManager.cxx

index 00cfe89..8879bda 100644 (file)
@@ -1097,7 +1097,7 @@ void AliCDBManager::UnloadFromCache(const char* path){
                        AliDebug(2, Form("Unloading object \"%s\" from cache", path));
                        TObjString pathStr(path);
                        AliCDBEntry *entry = dynamic_cast<AliCDBEntry*> (fEntryCache.GetValue(&pathStr));
-                       if(entry) delete entry;
+                       if(entry && !fEntryCache.IsOwnerValue()) delete entry;
                        delete fEntryCache.Remove(&pathStr);
                } else {
                        AliError(Form("Cache does not contain object \"%s\"!", path))
@@ -1116,7 +1116,7 @@ void AliCDBManager::UnloadFromCache(const char* path){
                        AliDebug(2, Form("Unloading object \"%s\" from cache", entryPath.GetPath().Data()));
                        TObjString pathStr(entryPath.GetPath().Data());
                        AliCDBEntry *entry = dynamic_cast<AliCDBEntry*> (fEntryCache.GetValue(&pathStr));
-                       if(entry) delete entry;
+                       if(entry && !fEntryCache.IsOwnerValue()) delete entry;
                        delete fEntryCache.Remove(&pathStr);
                }
        }