::basic_istream(); + 143 bytes; module
MSVCP80D.dll; 0x10497F1F
caller(9): std::basic_iostream(); + 115 bytes;
module MSVCP80D.dll; 0x104C9693
caller(10): std::basic_stringstream
::lexical_stream
(); file e:\projects\libraries\boost_1_33_1\boost\lexical_cast.hpp;
Hi,
I'm experiencing a memory leak while using lexical_cast with VC8.
The leak was detected by an end-user in a long-running application and evidenced
with GlowCode (a leak detection tool).
The origin seems to be an allocation inside ios_base (<xiosbase>).
Source code for the test:
#include <string>
#include
int main()
{
std::string s = "1234";
unsigned u = boost::lexical_cast<unsigned>(s);
}
GlowCode trace:
Handle 0x1555308 (0x1555308 = HeapAlloc( 0x310000, 0x0, 40))
caller(1): malloc_base(); + 236 bytes; module MSVCR80D.dll; 0x1024DB9C
caller(2): malloc_dbg(); + 725 bytes; module MSVCR80D.dll; 0x1020FAA5
caller(3): malloc_dbg(); + 105 bytes; module MSVCR80D.dll; 0x1020F839
caller(4): malloc_dbg(); + 31 bytes; module MSVCR80D.dll; 0x1020F7EF
caller(5): operator new(); + 30 bytes; module MSVCP80D.dll; 0x104F938E
caller(6): std::ios_base::_Init(); + 112 bytes; module
MSVCP80D.dll; 0x104877B0
caller(7): std::basic_ios::init(); +
15 bytes; module MSVCP80D.dll; 0x10497CFF
caller(8): std::basic_istream