Skip to content
Snippets Groups Projects
Commit 5f66dd03 authored by Edward Moyse's avatar Edward Moyse
Browse files

Merge branch 'refcount.IOVSvc-20200620' into 'master'

IOVSvc: Fix refcounting bug in createCondObj

See merge request atlas/athena!33975
parents 74ea2bd2 a2cb9afe
No related branches found
No related tags found
No related merge requests found
......@@ -847,6 +847,16 @@ IOVSvc::createCondObj(CondContBase* ccb, const DataObjID& id,
dobj = 0;
}
// Some data objects may be reference counted by the address.
// CondCont will take ownership of the object, but doesn't
// do refcounting. We'll have gotten a reference via the Storable_cast
// above, so it should be ok ... unless CondCont deletes
// the new object immediately instead of inserting.
// In that case, when we delete the address, it will
// follow an invalid pointer. So be sure to delete
// the address before the object is added to CondCont.
ioa.release();
// DataObject *d2 = static_cast<DataObject*>(v);
ATH_MSG_DEBUG( " SG::Storable_cast to obj: " << v );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment