Skip to content

Commit 426b4e1

Browse files
f3schdavidrohr
authored andcommitted
ITS: GPU: reverse destruction order to fix crash
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 5b0d25d commit 426b4e1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

GPU/GPUTracking/Global/GPUChainITS.cxx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator
3030
return mFWReco->AllocateDirectMemory(size, mType);
3131
}
3232
void deallocate(char* ptr, size_t size) final {} // this is a simple no-op
33-
void pushTagOnStack(uint64_t tag)
33+
void pushTagOnStack(uint64_t tag) final
3434
{
3535
mFWReco->PushNonPersistentMemory(tag);
3636
}
37-
void popTagOffStack(uint64_t tag)
37+
void popTagOffStack(uint64_t tag) final
3838
{
3939
mFWReco->PopNonPersistentMemory(GPUDataTypes::RecoStep::ITSTracking, tag);
4040
}
@@ -45,11 +45,7 @@ class GPUFrameworkExternalAllocator final : public o2::its::ExternalAllocator
4545
};
4646
} // namespace o2::its
4747

48-
GPUChainITS::~GPUChainITS()
49-
{
50-
mITSTrackerTraits.reset();
51-
mITSVertexerTraits.reset();
52-
}
48+
GPUChainITS::~GPUChainITS() = default;
5349

5450
GPUChainITS::GPUChainITS(GPUReconstruction* rec) : GPUChain(rec) {}
5551

GPU/GPUTracking/Global/GPUChainITS.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class GPUChainITS final : public GPUChain
3434
friend class GPUReconstruction;
3535

3636
public:
37-
~GPUChainITS() override;
37+
~GPUChainITS() final;
3838
int32_t Init() override;
3939
int32_t PrepareEvent() override;
4040
int32_t Finalize() override;
@@ -50,10 +50,10 @@ class GPUChainITS final : public GPUChain
5050

5151
protected:
5252
GPUChainITS(GPUReconstruction* rec);
53+
std::unique_ptr<o2::its::GPUFrameworkExternalAllocator> mFrameworkAllocator;
54+
std::unique_ptr<o2::its::TimeFrame<7>> mITSTimeFrame;
5355
std::unique_ptr<o2::its::TrackerTraits<7>> mITSTrackerTraits;
5456
std::unique_ptr<o2::its::VertexerTraits<7>> mITSVertexerTraits;
55-
std::unique_ptr<o2::its::TimeFrame<7>> mITSTimeFrame;
56-
std::unique_ptr<o2::its::GPUFrameworkExternalAllocator> mFrameworkAllocator;
5757
};
5858
} // namespace o2::gpu
5959

0 commit comments

Comments
 (0)