| 234 | |
| 235 | private: |
| 236 | void set(T* const pT, counter_t* const count_ptr) |
| 237 | { |
| 238 | if (m_ptr != pT) |
| 239 | { |
| 240 | if (m_count_ptr) |
| 241 | { |
| 242 | if (s_enable_annotations) |
| 243 | U_ANNOTATE_HAPPENS_BEFORE(m_count_ptr); |
| 244 | if (--(*m_count_ptr) == 0) |
| 245 | { |
| 246 | if (s_enable_annotations) |
| 247 | U_ANNOTATE_HAPPENS_AFTER(m_count_ptr); |
| 248 | delete m_ptr; |
| 249 | m_ptr = NULL; |
| 250 | delete m_count_ptr; |
| 251 | m_count_ptr = NULL; |
| 252 | } |
| 253 | } |
| 254 | m_ptr = pT; |
| 255 | m_count_ptr = count_ptr; |
| 256 | if (count_ptr) |
| 257 | ++(*m_count_ptr); |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | T* m_ptr; |
| 262 | counter_t* m_count_ptr; |
nothing calls this directly
no outgoing calls
no test coverage detected