From 71b19e2c692f56e4c0c8741e8679ce17f665d786 Mon Sep 17 00:00:00 2001 From: Aina Niemetz Date: Wed, 3 Oct 2018 22:35:59 -0700 Subject: [PATCH] Fix mem leak in sets_translate example. (#2589) --- examples/sets-translate/sets_translate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/sets-translate/sets_translate.cpp b/examples/sets-translate/sets_translate.cpp index 452a874a8..7a1990545 100644 --- a/examples/sets-translate/sets_translate.cpp +++ b/examples/sets-translate/sets_translate.cpp @@ -277,7 +277,8 @@ int main(int argc, char* argv[]) // Create the parser ParserBuilder parserBuilder(solver.get(), input, options); if(input == "") parserBuilder.withStreamInput(cin); - Parser* parser = parserBuilder.build(); + std::unique_ptr parser; + parser.reset(parserBuilder.build()); // Variables and assertions vector variables; -- 2.30.2