From b1c8f97409724f0d9ee5e89a1ed3d7eea8642274 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 4 Feb 2012 08:52:56 +0000 Subject: [PATCH] - AdvancedCPU.dll: Fixed memory leak - CoreTemp.dll: Fixed memory leak since r1111 --- Plugins/PluginAdvancedCPU/AdvancedCPU.cpp | 2 ++ Plugins/PluginCoreTemp/PluginCoreTemp.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Plugins/PluginAdvancedCPU/AdvancedCPU.cpp b/Plugins/PluginAdvancedCPU/AdvancedCPU.cpp index 007085bd..e447f534 100644 --- a/Plugins/PluginAdvancedCPU/AdvancedCPU.cpp +++ b/Plugins/PluginAdvancedCPU/AdvancedCPU.cpp @@ -305,6 +305,7 @@ void UpdateProcesses() { if (_wcsicmp(name, L"_Total") == 0) { + delete pObjInst; continue; } @@ -340,6 +341,7 @@ void UpdateProcesses() delete pPerfCntr; } } + delete pObjInst; } delete pPerfObj; diff --git a/Plugins/PluginCoreTemp/PluginCoreTemp.cpp b/Plugins/PluginCoreTemp/PluginCoreTemp.cpp index 41f139af..3863175a 100644 --- a/Plugins/PluginCoreTemp/PluginCoreTemp.cpp +++ b/Plugins/PluginCoreTemp/PluginCoreTemp.cpp @@ -136,6 +136,12 @@ PLUGIN_EXPORT LPCWSTR GetString(void* data) return buffer; } +PLUGIN_EXPORT void Finalize(void* data) +{ + MeasureData* measure = (MeasureData*)data; + delete measure; +} + bool areStringsEqual(LPCWSTR i_String1, LPCWSTR i_Strting2) { return _wcsicmp(i_String1, i_Strting2) == 0;