This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] Fix PR libstdc++/10276


OK, the reason we're getting memory leaks is that the locale cache was never
getting deleted.  The callback got registered within the first call to
basic_ios::init, but the callback list was blown away by the second call,
hence no deletion.

This doesn't address the zero allocation issues so we still leak the bytes for
the standard stream caches.

Simple fix, no regressions on 3.3.

2003-04-03  Jerry Quinn  <jlquinn at optonline dot net>

        * src/ios.cc (ios_base::_M_init): Remove _M_callbacks initialization.

*** ios.cc.~1.33.2.4.~	Thu Mar  6 20:44:11 2003
--- ios.cc	Thu Apr  3 00:40:30 2003
***************
*** 287,293 ****
      _M_precision = 6;
      _M_width = 0;
      _M_flags = skipws | dec;
-     _M_callbacks = 0;
      _M_ios_locale = locale();
    }  
    
--- 287,292 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]