Celeritas 0.7.0-dev.555+develop.5c5a8f0a7
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
celeritas::GeantSd::ProcessorSlotDeleter Struct Reference

Clear a slot's cached pointers when its hit processor is destroyed. More...

Public Member Functions

void operator() (HitProcessor *processor) const
 

Public Attributes

std::weak_ptr< ProcessorSlot > weak_slot
 

Detailed Description

Clear a slot's cached pointers when its hit processor is destroyed.

The references between the slot and the processor are cyclic and deliberately non-owning in both directions:

GeantSd --(shared)--> ProcessorSlot --(weak + raw cache)--> HitProcessor
                            ^                                    |
                            +--(weak, via this deleter)----------+

LocalTransporter --(shared, with this deleter)--> HitProcessor

The thread-local transporter shares ownership of the processor, and GeantSd owns the slot. Since the cross references are weak, either side may be destroyed first:


The documentation for this struct was generated from the following file: