Signed-off-by: Thomas Spura <[email protected]>
---
cpu/cpu.cpp | 8 ++++++++
cpu/cpu.h | 1 +
main.cpp | 1 +
3 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cpu/cpu.cpp b/cpu/cpu.cpp
index 563aa30..c4cd2ed 100644
--- a/cpu/cpu.cpp
+++ b/cpu/cpu.cpp
@@ -999,3 +999,11 @@ void clear_cpu_data(void)
delete perf_events;
}
+
+void clear_all_cpus(void)
+{
+ for (int i = 0; i < all_cpus.size(); i++) {
+ delete all_cpus[i];
+ }
+ all_cpus.clear();
+}
diff --git a/cpu/cpu.h b/cpu/cpu.h
index d59dbb3..5d30265 100644
--- a/cpu/cpu.h
+++ b/cpu/cpu.h
@@ -222,6 +222,7 @@ extern void end_cpu_measurement(void);
extern void process_cpu_data(void);
extern void end_cpu_data(void);
extern void clear_cpu_data(void);
+extern void clear_all_cpus(void);
#endif
diff --git a/main.cpp b/main.cpp
index f545c92..2f1def5 100644
--- a/main.cpp
+++ b/main.cpp
@@ -404,6 +404,7 @@ int main(int argc, char **argv)
reset_display();
clear_all_devices();
+ clear_all_cpus();
return 0;
--
1.7.7.6
_______________________________________________
Power mailing list
[email protected]
https://bughost.org/mailman/listinfo/power