| 146 | unsigned long long CStat::M_G_counters[E_NB_G_COUNTER - E_NB_COUNTER]; |
| 147 | |
| 148 | CStat::~CStat() |
| 149 | { |
| 150 | int i; |
| 151 | |
| 152 | dumpDataRtt(); |
| 153 | for (i = 0; i < nRtds(); i++) { |
| 154 | if (M_ResponseTimeRepartition[i] != nullptr) { |
| 155 | delete [] M_ResponseTimeRepartition[i]; |
| 156 | } |
| 157 | } |
| 158 | free(M_ResponseTimeRepartition); |
| 159 | |
| 160 | if (M_CallLengthRepartition != nullptr) |
| 161 | delete [] M_CallLengthRepartition; |
| 162 | |
| 163 | if(M_outputStream != nullptr) { |
| 164 | M_outputStream->close(); |
| 165 | delete M_outputStream; |
| 166 | } |
| 167 | |
| 168 | if(M_fileName != nullptr) |
| 169 | delete [] M_fileName; |
| 170 | |
| 171 | if(M_outputStreamRtt != nullptr) { |
| 172 | M_outputStreamRtt->close(); |
| 173 | delete M_outputStreamRtt; |
| 174 | } |
| 175 | if(M_fileNameRtt != nullptr) |
| 176 | delete [] M_fileNameRtt; |
| 177 | |
| 178 | |
| 179 | if(M_dumpRespTime != nullptr) |
| 180 | delete [] M_dumpRespTime; |
| 181 | |
| 182 | free(M_rtdInfo); |
| 183 | for (int_str_map::iterator i = M_revRtdMap.begin(); i != M_revRtdMap.end(); ++i) { |
| 184 | free(i->second); |
| 185 | } |
| 186 | |
| 187 | M_SizeOfResponseTimeRepartition = 0; |
| 188 | M_SizeOfCallLengthRepartition = 0; |
| 189 | M_CallLengthRepartition = nullptr; |
| 190 | M_fileName = nullptr; |
| 191 | M_outputStream = nullptr; |
| 192 | |
| 193 | M_outputStreamRtt = nullptr; |
| 194 | M_fileNameRtt = nullptr; |
| 195 | M_dumpRespTime = nullptr; |
| 196 | } |
| 197 | |
| 198 | |
| 199 | int CStat::init () |