Allocated array should be deallocated with delete [].
Deallocating it with delete can cause memory leaks.
This commit is contained in:
Per A. Brodtkorb
2020-03-24 16:22:27 +01:00
parent f1aaa8b6d3
commit b525fbb037

View File

@@ -141,12 +141,13 @@ pdcDrawPolyPolygonOp::pdcDrawPolyPolygonOp(int n, int count[], wxPoint points[],
pdcDrawPolyPolygonOp::~pdcDrawPolyPolygonOp()
{
if (m_points) delete m_points;
if (m_count) delete m_count;
if (m_points) delete[] m_points;
if (m_count) delete[] m_count;
m_points=NULL;
m_count=NULL;
}
// ----------------------------------------------------------------------------
// pdcDrawLinesOp
// ----------------------------------------------------------------------------