From: Aina Niemetz Date: Thu, 4 Oct 2018 05:35:59 +0000 (-0700) Subject: Fix mem leak in sets_translate example. (#2589) X-Git-Tag: cvc5-1.0.0~4462 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=71b19e2c692f56e4c0c8741e8679ce17f665d786;p=cvc5.git Fix mem leak in sets_translate example. (#2589) --- 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;