From 78660fb70e853d2460e78b5a6b6f345e26687d84 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Mon, 10 Feb 2025 16:54:15 -0500 Subject: [PATCH] main: and remembered to delete the variable from heap ... Signed-off-by: Vincent Batts --- main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d2f2694..d6874a8 100644 --- a/main.cpp +++ b/main.cpp @@ -34,11 +34,12 @@ Account* do_account() { void scoped_account() { log_out("HERE"); - Account* account = do_account(); + auto account = do_account(); log_out("HERE"); account->withdraw(100); log_out("Current Balance: " << account->getBalance()); log_err("dang"); + delete account; }