File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ class OLeaf<T*> : public OChunk
168168 memcpy (m_pd, pd, sizeof (T)*nsize);
169169 m_nsize = nsize;
170170 }
171- ~OLeaf () { delete m_pd; }
171+ ~OLeaf () { delete[] m_pd; }
172172
173173 int Size () { return sizeof (T)*m_nsize; }
174174 void Write (FileStream* fp)
@@ -194,7 +194,7 @@ class OLeaf<const char*> : public OChunk
194194 m_psz = new char [l+1 ];
195195 memcpy (m_psz, sz, l+1 );
196196 }
197- ~OLeaf () { delete m_psz; }
197+ ~OLeaf () { delete[] m_psz; }
198198
199199 int Size () { return (int )strlen (m_psz)+sizeof (int ); }
200200 void Write (FileStream* fp)
@@ -224,7 +224,7 @@ class OLeaf<std::vector<T> > : public OChunk
224224 memcpy (m_pd, &a[0 ], sizeof (T) * m_nsize);
225225 }
226226 }
227- ~OLeaf () { delete m_pd; }
227+ ~OLeaf () { delete[] m_pd; }
228228
229229 int Size () { return sizeof (T)*m_nsize; }
230230 void Write (FileStream* fp)
You can’t perform that action at this time.
0 commit comments