This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[v3] Fix PR libstdc++/10276
- From: Jerry Quinn <jlquinn at optonline dot net>
- To: libstdc++ at gcc dot gnu dot org, carlo at alinoe dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 03 Apr 2003 00:48:13 -0500
- Subject: [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 ----