aboutsummaryrefslogtreecommitdiff
path: root/libio/streambuf.h
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>1999-04-29 08:32:13 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>1999-04-29 08:32:13 +0000
commit9939c435d293b687481de7fb0d2d95d077b3e168 (patch)
treeb8d0f62b3644c141fb840a6a3868a45f3bf57fbd /libio/streambuf.h
parent4c6eb8f55df8615976c41993607fd2d3887eff1d (diff)
downloadgcc-9939c435d293b687481de7fb0d2d95d077b3e168.zip
gcc-9939c435d293b687481de7fb0d2d95d077b3e168.tar.gz
gcc-9939c435d293b687481de7fb0d2d95d077b3e168.tar.bz2
* streambuf.h (ios::~ios): Use operator delete[] to remove _arrays.
From-SVN: r26691
Diffstat (limited to 'libio/streambuf.h')
-rw-r--r--libio/streambuf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/streambuf.h b/libio/streambuf.h
index bc734bc..d472cbe 100644
--- a/libio/streambuf.h
+++ b/libio/streambuf.h
@@ -482,7 +482,9 @@ inline ios::~ios() {
#ifndef _IO_NEW_STREAMS
if (!(_flags & (unsigned int)ios::dont_close)) delete rdbuf();
#endif
- if (_arrays) delete [] _arrays;
+ // It is safe to use naked operator delete[] as we know elements have no
+ // dtor, and g++ does not add a new[] cookie for such cases.
+ operator delete[] (_arrays);
}
} // extern "C++"
#endif /* _STREAMBUF_H */