我有一个关于std :: string中可能的内存泄漏的许多valgrind警告的问题,像这样:
@H_502_10@解决方法
120 bytes in 4 blocks are possibly lost in loss record 4,192 of 4,687 at 0x4A06819: operator new(unsigned long) (vg_replace_malloc.c:230) by 0x383B89B8B0: std::string::_Rep::_S_create(unsigned long,unsigned long,std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.8) by 0x383B89C3B4: (within /usr/lib64/libstdc++.so.6.0.8) by 0x383B89C4A9: std::basic_string<char,std::char_traits<char>,std::allocator<char> >::basic_string(char const*,std::allocator<char> const&) (in /usr/lib64/libstdc++.so.6.0.8)
我在想:@H_403_5@
> std :: string(GCC 4.1.2)是否使用任何内存池?
>如果是,是否有任何方法来禁用池(以调试生成的形式等)?@H_403_5@