From 91022e7633754e7a1e45c57014cf643bfed68ae6 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Tue, 13 May 2025 09:09:50 +0200 Subject: [PATCH] Out of line FairTBuffer destructor --- Framework/Core/include/Framework/TMessageSerializer.h | 3 +++ Framework/Core/src/TMessageSerializer.cxx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Framework/Core/include/Framework/TMessageSerializer.h b/Framework/Core/include/Framework/TMessageSerializer.h index 769d23a7a3427..b6e355638c1e3 100644 --- a/Framework/Core/include/Framework/TMessageSerializer.h +++ b/Framework/Core/include/Framework/TMessageSerializer.h @@ -40,6 +40,8 @@ class FairOutputTBuffer : public TBufferFile : TBufferFile(TBuffer::kWrite, msg.GetSize() - sizeof(char*), embedInItself(msg), false, fairMQrealloc) { } + + ~FairOutputTBuffer() override; // Helper function to keep track of the FairMQ message that holds the data // in the data itself. We can use this to make sure the message can be reallocated // even if we simply have a pointer to the data. Hopefully ROOT will not play dirty @@ -60,6 +62,7 @@ class FairInputTBuffer : public TBufferFile : TBufferFile(TBuffer::kRead, size - sizeof(char*), data + sizeof(char*), false, nullptr) { } + ~FairInputTBuffer() override; }; struct TMessageSerializer { diff --git a/Framework/Core/src/TMessageSerializer.cxx b/Framework/Core/src/TMessageSerializer.cxx index c5da4cc576242..81a1c6e537d09 100644 --- a/Framework/Core/src/TMessageSerializer.cxx +++ b/Framework/Core/src/TMessageSerializer.cxx @@ -15,6 +15,9 @@ using namespace o2::framework; +FairOutputTBuffer::~FairOutputTBuffer() = default; +FairInputTBuffer::~FairInputTBuffer() = default; + void* FairOutputTBuffer::embedInItself(fair::mq::Message& msg) { // The first bytes of the message are used to store the pointer to the message itself