Mark pointer invalid after destroy tensor
This commit is contained in:
parent
f02b9d6915
commit
1cc369cb19
1 changed files with 4 additions and 0 deletions
|
|
@ -360,6 +360,10 @@ Tensor::destroy()
|
||||||
{
|
{
|
||||||
KP_LOG_DEBUG("Kompute Tensor started destroy()");
|
KP_LOG_DEBUG("Kompute Tensor started destroy()");
|
||||||
|
|
||||||
|
this->mRawData = nullptr;
|
||||||
|
this->mSize = 0;
|
||||||
|
this->mDataTypeMemorySize = 0;
|
||||||
|
|
||||||
if (!this->mDevice) {
|
if (!this->mDevice) {
|
||||||
KP_LOG_WARN(
|
KP_LOG_WARN(
|
||||||
"Kompute Tensor destructor reached with null Device pointer");
|
"Kompute Tensor destructor reached with null Device pointer");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue