I have problem with memory leaks. I use boost version 1.47. I compiled boost libray by Visual Studio 2010 SP1. My testing code is here: #include "stdafx.h" #include <stdio.h> #include <boost/regex.hpp> void Memtest() { boost::regex e("^(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})(:\\d{1,5})?$"); if ( boost::regex_match("1.a.1.1", e) ) std::cout << "ok" << std::endl; if ( boost::regex_match("1.1.1.1", e) ) std::cout << "ok" << std::endl; } int main(int argc, _TCHAR* argv[]) { _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG ); _CrtMemState state; _CrtMemCheckpoint(&state); Memtest(); _CrtMemState newState, diff; _CrtMemCheckpoint(&newState); if(_CrtMemDifference(&diff, &state, &newState)) { _CrtMemDumpStatistics(&diff); } return 0; } This code comes from simple console based project. Debugger gives me these output: 0 bytes in 0 Free Blocks. 5544 bytes in 16 Normal Blocks. 0 bytes in 0 CRT Blocks. 0 bytes in 0 Ignore Blocks. 0 bytes in 0 Client Blocks. Largest number used: 9333 bytes. Total allocations: 13620 bytes. Could anyone help me to resolve these memory leaks? Thanks, Michal
participants (2)
-
jamich - Post
-
John Maddock