summaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-29 08:32:13 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-29 08:32:13 +0000
commit1e332c6fe5855dda65d612c7491028025f997673 (patch)
treeb8d0f62b3644c141fb840a6a3868a45f3bf57fbd /libio
parent6ec8b7651d2bebca28bc5d8e86f034ebb5203e4e (diff)
downloadgcc-1e332c6fe5855dda65d612c7491028025f997673.tar.gz
* streambuf.h (ios::~ios): Use operator delete[] to remove _arrays.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libio')
-rw-r--r--libio/ChangeLog4
-rw-r--r--libio/streambuf.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog
index 5509fa329ef..15095d836d3 100644
--- a/libio/ChangeLog
+++ b/libio/ChangeLog
@@ -1,3 +1,7 @@
+1999-04-29 Nathan Sidwell <nathan@acm.org>
+
+ * streambuf.h (ios::~ios): Use operator delete[] to remove _arrays.
+
Mon Apr 12 19:22:44 1999 Mumit Khan <khan@xraylith.wisc.edu>
* filedoalloc.c (_POSIX_SOURCE): Remove definition.
diff --git a/libio/streambuf.h b/libio/streambuf.h
index bc734bc75b0..d472cbece2c 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 */