Mark pointer invalid after destroy tensor

This commit is contained in:
Alejandro Saucedo 2021-03-07 08:02:30 +00:00
parent f02b9d6915
commit 1cc369cb19

View file

@ -360,6 +360,10 @@ Tensor::destroy()
{
KP_LOG_DEBUG("Kompute Tensor started destroy()");
this->mRawData = nullptr;
this->mSize = 0;
this->mDataTypeMemorySize = 0;
if (!this->mDevice) {
KP_LOG_WARN(
"Kompute Tensor destructor reached with null Device pointer");