Skip to content

Commit

Permalink
simplify destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Nov 20, 2024
1 parent b547928 commit a733d25
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions clic/src/array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,9 @@ Array::~Array()
{
if (initialized())
{
if (data_.use_count() == 1 && get() != nullptr)
{
backend_.freeMemory(device(), mtype(), get());
}
backend_.freeMemory(device(), mtype(), get());
data_.reset();
initialized_ = false;
}
}

Expand Down

0 comments on commit a733d25

Please sign in to comment.