commit e2ef67354b8e81d48adcdb9eea975d0f0408b0a8 Author: tim Date: Tue Oct 15 10:40:01 2013 -0400 2013-10-15 Tim Shen PR libstdc++/58737 * include/bits/regex_automaton.h (_Automaton<>::~_Automaton): Fix memory leak by adding it. * include/bits/regex_executor.h (_Executor<>::~_Executor): Likewise. diff --git a/libstdc++-v3/include/bits/regex_automaton.h b/libstdc++-v3/include/bits/regex_automaton.h index 60744b2..35cfc1b 100644 --- a/libstdc++-v3/include/bits/regex_automaton.h +++ b/libstdc++-v3/include/bits/regex_automaton.h @@ -112,6 +112,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION typedef size_t _SizeT; public: + virtual + ~_Automaton() + { } + virtual _SizeT _M_sub_count() const = 0; diff --git a/libstdc++-v3/include/bits/regex_executor.h b/libstdc++-v3/include/bits/regex_executor.h index 4626437..23b5d01 100644 --- a/libstdc++-v3/include/bits/regex_executor.h +++ b/libstdc++-v3/include/bits/regex_executor.h @@ -83,6 +83,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION : __flags) { } + virtual + ~_Executor() + { } + // Set matched when string exactly match the pattern. bool _M_match()