Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Make the MatArrayBase safe for multiple calls of Dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Wierda authored and Stefan Wierda committed Jul 7, 2019
1 parent 0883345 commit 95eab41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/src/MatArrayBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ MatArrayBase::MatArrayBase(const Mat& mat)
MatArrayBase::!MatArrayBase()
{
delete this->mat;

this->mat = nullptr;
if (this->memoryPressure > 0)
{
GC::RemoveMemoryPressure(this->memoryPressure);
this->memoryPressure = 0;
}
}

Expand Down

0 comments on commit 95eab41

Please sign in to comment.