From 5bf349bb1f6e042d8a9f1a54cb88ca587b92b8f3 Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Thu, 28 Jul 2022 13:09:21 -0500 Subject: [PATCH 1/2] In MemoryManager_clear_memory.cpp call delete_var with destroy flag==true. #1301 (#1324) Authored-by: John M. Penn --- .../sim_services/MemoryManager/MemoryManager_clear_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp b/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp index a71e1ffa..25e4939c 100644 --- a/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp +++ b/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp @@ -307,7 +307,7 @@ void Trick::MemoryManager::reset_memory() { n_addrs = deletion_list.size(); for (ii = 0 ; ii < n_addrs ; ii ++) { - delete_var( deletion_list[ii], false); + delete_var( deletion_list[ii], true); } // reset counter to 100mil. This (hopefully) ensures all alloc'ed ids are after external variables. From be5f170b9046a3edd23e4a765b1d6cda12fa4a3a Mon Sep 17 00:00:00 2001 From: Scott Fennell Date: Thu, 28 Jul 2022 14:58:13 -0500 Subject: [PATCH 2/2] Revert "In MemoryManager_clear_memory.cpp call delete_var with destroy flag==true. #1301 (#1324)" (#1325) This reverts commit 5bf349bb1f6e042d8a9f1a54cb88ca587b92b8f3. --- .../sim_services/MemoryManager/MemoryManager_clear_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp b/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp index 25e4939c..a71e1ffa 100644 --- a/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp +++ b/trick_source/sim_services/MemoryManager/MemoryManager_clear_memory.cpp @@ -307,7 +307,7 @@ void Trick::MemoryManager::reset_memory() { n_addrs = deletion_list.size(); for (ii = 0 ; ii < n_addrs ; ii ++) { - delete_var( deletion_list[ii], true); + delete_var( deletion_list[ii], false); } // reset counter to 100mil. This (hopefully) ensures all alloc'ed ids are after external variables.