diff --git a/src/Memory/UniquePtrList.hpp b/src/Memory/UniquePtrList.hpp index 712d322..28ddc42 100644 --- a/src/Memory/UniquePtrList.hpp +++ b/src/Memory/UniquePtrList.hpp @@ -41,6 +41,15 @@ namespace ArbUt { #endif return _vector[index]; } + ValueT* TakeOwnership(size_t index) { + auto p = _vector[index]; + _vector[index] = nullptr; + return p; + } + void Set(size_t index, ValueT* ptr) { + delete _vector[index]; + _vector[index] = ptr; + } inline void Remove(size_t index) { #ifndef NO_ASSERT