diff --git a/src/Memory/UniquePtrList.hpp b/src/Memory/UniquePtrList.hpp index bcbd44e..10e2369 100644 --- a/src/Memory/UniquePtrList.hpp +++ b/src/Memory/UniquePtrList.hpp @@ -50,9 +50,9 @@ namespace ArbUt { throw std::logic_error(ss.str()); } #endif - auto item = _vector.at(index); + auto item = _vector[index]; delete item; - _vector.erase(index); + _vector.erase(item); } inline bool Contains(const BorrowedPtr& value) const {