Permalink
Browse files

fix for dyloaded libs getting unloaded to early on app exit

  • Loading branch information...
Jim Carroll authored and Memphiz committed Jun 24, 2011
1 parent c94cdcb commit 39734940200bc59f630f694912b940bfe374dcfa
Showing with 7 additions and 3 deletions.
  1. +0 −1 xbmc/Application.cpp
  2. +3 −1 xbmc/SectionLoader.cpp
  3. +4 −1 xbmc/SectionLoader.h
View
@@ -3135,7 +3135,6 @@ bool CApplication::Cleanup()
CAddonMgr::Get().DeInit();
CLog::Log(LOGNOTICE, "unload sections");
- CSectionLoader::UnloadAll();
#ifdef HAS_PERFORMANCE_SAMPLE
CLog::Log(LOGNOTICE, "performance statistics");
View
@@ -40,7 +40,9 @@ CSectionLoader::CSectionLoader(void)
{}
CSectionLoader::~CSectionLoader(void)
-{}
+{
+ UnloadAll();
+}
bool CSectionLoader::IsLoaded(const CStdString& strSection)
{
View
@@ -55,13 +55,16 @@ class CSectionLoader
static LibraryLoader* LoadDLL(const CStdString& strSection, bool bDelayUnload=true, bool bLoadSymbols=false);
static void UnloadDLL(const CStdString& strSection);
static void UnloadDelayed();
- static void UnloadAll();
protected:
std::vector<CSection> m_vecLoadedSections;
typedef std::vector<CSection>::iterator ivecLoadedSections;
std::vector<CDll> m_vecLoadedDLLs;
CCriticalSection m_critSection;
+
+private:
+ void UnloadAll();
};
XBMC_GLOBAL_REF(CSectionLoader,g_sectionLoader);
+#define g_sectionLoader XBMC_GLOBAL_USE(CSectionLoader)

0 comments on commit 3973494

Please sign in to comment.