X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fruntime%2FTensorAllocator.cpp;h=5c719c761a30624151ba0b0aeef9b51c9ca54ec8;hb=46d5927c3461ec270de8b0fc087ac5dc2431488f;hp=a272ac233a14ed4fd952206f19d8d9f31fb7a0e5;hpb=c772c0b2ecfe76cac5867915fdc296d14bb829a2;p=platform%2Fupstream%2Farmcl.git diff --git a/src/runtime/TensorAllocator.cpp b/src/runtime/TensorAllocator.cpp index a272ac2..5c719c7 100644 --- a/src/runtime/TensorAllocator.cpp +++ b/src/runtime/TensorAllocator.cpp @@ -101,6 +101,14 @@ void TensorAllocator::allocate() info().set_is_resizable(false); } +void TensorAllocator::free() +{ + ARM_COMPUTE_ERROR_ON(_buffer == nullptr); + + _buffer.reset(); + info().set_is_resizable(true); +} + uint8_t *TensorAllocator::lock() { return (_buffer != nullptr) ? _buffer.get()->data() : nullptr;