RE: [Boost-users] newbie question about boost::regex and memory leaks
Ben Hastings wrote:
The only memory allocation I can see is for the array that pclasses points to and the strings in it. These are freed in do_free() which is called by the destructor of the last instance of w32_traits_base. Since each of the derived classes of w32_traits_base (w32_regex_traits<char> and w32_regex_traits
) has a static instance of itself as a member, the memory will not be freed until after main() returns. So if you call _CrtDumpMemoryLeaks() at the end of main() this memory will wrongly be reported as leaked.
Ben, this was exactly my problem. Sorry for the bonehead and thanks for the help. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (1)
-
Gregory, Matthew