diff --git a/include/podio/detail/Association.h b/include/podio/detail/Association.h index 3b5fc4204..048500375 100644 --- a/include/podio/detail/Association.h +++ b/include/podio/detail/Association.h @@ -69,7 +69,8 @@ class AssociationT { template && std::is_same_v>> MutableAssociation clone() const { - return {new AssociationObjT(*m_obj)}; + return MutableAssociation( + podio::utils::MaybeSharedPtr(new AssociationObjT(*m_obj), podio::utils::MarkOwned)); } static Association makeEmpty() {