From 4daed5ebe3e8eae184a96055974ac15a3c55507f Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Sun, 15 Apr 2012 00:26:12 +0200 Subject: Removed all memory leaks detected by valgrind --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index 5044f18..d12119e 100644 --- a/main.cpp +++ b/main.cpp @@ -8,13 +8,13 @@ int main(int argc, char *argv[]) std::cin >> inputTerm; // Example: 2.5*(2+3-(3/2+1)) - Parser *parser = new Parser(); + Parser parser; try { typedef std::numeric_limits dbl; std::cout.precision(dbl::digits10); - std::cout << parser->calculate(inputTerm, false).result << std::endl; + std::cout << parser.calculate(inputTerm, false).result << std::endl; } catch ( exception &e ) { -- cgit v1.2.3