TVector takes ownership of T
| 33 | |
| 34 | // TVector takes ownership of T |
| 35 | void PushBack(T* t) { |
| 36 | try { |
| 37 | TBase::push_back(t); |
| 38 | } catch (...) { |
| 39 | if (t) { |
| 40 | D::Destroy(t); |
| 41 | } |
| 42 | throw; |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void PushBack(std::unique_ptr<T> t) { |
| 47 | PushBack(t.release()); |
no test coverage detected