-------------------------------------------------------------------- Destructor
| 58 | // Destructor |
| 59 | // |
| 60 | G4ProcessTable::~G4ProcessTable() |
| 61 | { |
| 62 | if ( tmpTblVector != nullptr ) |
| 63 | { |
| 64 | tmpTblVector ->clear(); |
| 65 | delete tmpTblVector; |
| 66 | tmpTblVector = nullptr; |
| 67 | } |
| 68 | |
| 69 | if ( fProcTblVector != nullptr ) |
| 70 | { |
| 71 | for (auto elem : *fProcTblVector) |
| 72 | { |
| 73 | delete elem; |
| 74 | } |
| 75 | fProcTblVector ->clear(); |
| 76 | delete fProcTblVector; |
| 77 | fProcTblVector = nullptr; |
| 78 | } |
| 79 | |
| 80 | // delete all process except transportation |
| 81 | for(auto proc : fListProcesses) |
| 82 | { |
| 83 | if ( proc != nullptr ) |
| 84 | { |
| 85 | G4ProcessType type = proc->GetProcessType(); |
| 86 | if (type != fTransportation && type != fParallel |
| 87 | && type != fParameterisation) |
| 88 | { |
| 89 | delete proc; |
| 90 | } |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | fListProcesses.clear(); |
| 95 | |
| 96 | if ( fProcNameVector != nullptr ) |
| 97 | { |
| 98 | fProcNameVector ->clear(); |
| 99 | delete fProcNameVector; |
| 100 | fProcNameVector = nullptr; |
| 101 | } |
| 102 | fProcessTable = nullptr; |
| 103 | delete fProcTblMessenger; |
| 104 | } |
| 105 | |
| 106 | // -------------------------------------------------------------------- |
| 107 | // |
nothing calls this directly
no test coverage detected