Skip to content

Commit

Permalink
Refs #21082. Fix release order in WriterHistory destructor.
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Jun 19, 2024
1 parent ae546de commit 60154a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cpp/rtps/history/WriterHistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ WriterHistory::WriterHistory(

WriterHistory::~WriterHistory()
{
// TODO Auto-generated destructor stub
// As releasing the change pool will delete the cache changes it owns,
// the payload pool may be called to release their payloads, so we should
// ensure that the payload pool is destroyed after the change pool.
change_pool_.reset();
payload_pool_.reset();
}

const std::shared_ptr<IPayloadPool>& WriterHistory::get_payload_pool() const
Expand Down

0 comments on commit 60154a1

Please sign in to comment.