Skip to content

Commit

Permalink
Make sure to cleanup cloned associations properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jan 31, 2024
1 parent 69513a9 commit ca9272c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/podio/detail/Association.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class AssociationT {
template <typename FromU = FromT, typename ToU = ToT,
typename = std::enable_if_t<std::is_same_v<FromU, FromT> && std::is_same_v<ToU, ToT>>>
MutableAssociation<FromU, ToU> clone() const {
return {new AssociationObjT(*m_obj)};
return MutableAssociation<FromU, ToU>(
podio::utils::MaybeSharedPtr(new AssociationObjT(*m_obj), podio::utils::MarkOwned));
}

static Association<FromT, ToT> makeEmpty() {
Expand Down

0 comments on commit ca9272c

Please sign in to comment.