From 798ea5d01080f59933aa8d67f50659936cd4033e Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Thu, 2 Feb 2012 12:49:36 +0000 Subject: [PATCH] NowPlaying: Fixed memory leak in TagLib. --- Plugins/PluginNowPlaying/NowPlaying.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Plugins/PluginNowPlaying/NowPlaying.cpp b/Plugins/PluginNowPlaying/NowPlaying.cpp index 879f9ad9..884c2650 100644 --- a/Plugins/PluginNowPlaying/NowPlaying.cpp +++ b/Plugins/PluginNowPlaying/NowPlaying.cpp @@ -27,6 +27,7 @@ #include "PlayerWinamp.h" #include "PlayerWLM.h" #include "PlayerWMP.h" +#include "id3v1tag.h" static std::vector g_ParentMeasures; std::wstring g_SettingsFile; @@ -42,6 +43,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) // Disable DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls DisableThreadLibraryCalls(hinstDLL); break; + + case DLL_PROCESS_DETACH: + TagLib::ID3v1::Tag::setStringHandler(NULL); + break; } return TRUE;