]> gcc.gnu.org Git - gcc.git/commitdiff
* streambuf.h (ios::~ios): Use operator delete[] to remove _arrays.
authorNathan Sidwell <nathan@acm.org>
Thu, 29 Apr 1999 08:32:13 +0000 (08:32 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 29 Apr 1999 08:32:13 +0000 (08:32 +0000)
From-SVN: r26691

libio/ChangeLog
libio/streambuf.h

index 5509fa329ef9deb114790181d07d0a1b3383f16d..15095d836d37c766565b2d79eedab16d346cde69 100644 (file)
@@ -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.
index bc734bc75b0aa6643514d50728ab05aa40029563..d472cbece2c6abc7cf320b5115d7c1822323d1eb 100644 (file)
@@ -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 */
This page took 0.069454 seconds and 5 git commands to generate.