Skip to content

Commit

Permalink
Make sure to cleanup buffers in CollectionData constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Oct 7, 2023
1 parent c3d7760 commit acc4742
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/templates/CollectionData.cc.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
m_vec_{{ member.name }}.reset(podio::CollectionReadBuffers::asVector<{{ member.full_type }}>(m_vecmem_info[{{ loop.index0 }}].second));
{% endfor %}
}

// Cleanup these to avoid leaking them
delete buffers.references;
delete buffers.vectorMembers;
}

void {{ class_type }}::clear(bool isSubsetColl) {
Expand Down

0 comments on commit acc4742

Please sign in to comment.