From 3ce1423c1b46506565d9ee6e1c2826d1968c0fca Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Wed, 19 Mar 2025 11:18:04 +0100
Subject: [PATCH] Delete sphere_jxi488_loop() logger after use

---
 src/sphere/sphere.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sphere/sphere.cpp b/src/sphere/sphere.cpp
index 38c45234..a2d5228e 100644
--- a/src/sphere/sphere.cpp
+++ b/src/sphere/sphere.cpp
@@ -610,6 +610,7 @@ int sphere_jxi488_cycle(
     if (jer != 0) {
       oi->vec_ier[jxindex] = 1;
       oi->lcalc = lcalc;
+      delete logger;
       return jer;
     }
   } // i132
@@ -868,6 +869,7 @@ int sphere_jxi488_cycle(
   } // jth486 loop on azimuth
   oi->vec_jxi[jxindex] = jxi;
   logger->log("INFO: finished scale iteration " + to_string(jxi) + " of " + to_string(nxi) + ".\n");
+  delete logger;
   return jer;
 }
 
-- 
GitLab