From 2375b229b78ed32e6734a98f646f0c4d1a4acc2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrija=20Plaveti=C4=87?= Date: Thu, 6 Aug 2026 11:46:19 +0200 Subject: [PATCH] Matched delete operator with the assignment. Fixes #131. --- FEBioPlot/PltArchive.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FEBioPlot/PltArchive.h b/FEBioPlot/PltArchive.h index 62bb0c650..ab11f8ba2 100644 --- a/FEBioPlot/PltArchive.h +++ b/FEBioPlot/PltArchive.h @@ -168,7 +168,7 @@ class OLeaf : public OChunk memcpy(m_pd, pd, sizeof(T)*nsize); m_nsize = nsize; } - ~OLeaf() { delete m_pd; } + ~OLeaf() { delete[] m_pd; } int Size() { return sizeof(T)*m_nsize; } void Write(FileStream* fp) @@ -194,7 +194,7 @@ class OLeaf : public OChunk m_psz = new char[l+1]; memcpy(m_psz, sz, l+1); } - ~OLeaf() { delete m_psz; } + ~OLeaf() { delete[] m_psz; } int Size() { return (int)strlen(m_psz)+sizeof(int); } void Write(FileStream* fp) @@ -224,7 +224,7 @@ class OLeaf > : public OChunk memcpy(m_pd, &a[0], sizeof(T) * m_nsize); } } - ~OLeaf() { delete m_pd; } + ~OLeaf() { delete[] m_pd; } int Size() { return sizeof(T)*m_nsize; } void Write(FileStream* fp)