aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2011-06-24 17:45:36 -0400
committerMemphiz <memphis@machzwo.de>2011-06-28 23:43:11 +0200
commit39734940200bc59f630f694912b940bfe374dcfa (patch)
treeff79802fbe67879e031b522d389ff4fd37db1898
parentc94cdcb5f3c1f07e557598e9345761942a0217e5 (diff)
fix for dyloaded libs getting unloaded to early on app exit
-rw-r--r--xbmc/Application.cpp1
-rw-r--r--xbmc/SectionLoader.cpp4
-rw-r--r--xbmc/SectionLoader.h5
3 files changed, 7 insertions, 3 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 4756f2153f..3520c8772b 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -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");
diff --git a/xbmc/SectionLoader.cpp b/xbmc/SectionLoader.cpp
index 2fc086aa8a..2f1e7424d6 100644
--- a/xbmc/SectionLoader.cpp
+++ b/xbmc/SectionLoader.cpp
@@ -40,7 +40,9 @@ CSectionLoader::CSectionLoader(void)
{}
CSectionLoader::~CSectionLoader(void)
-{}
+{
+ UnloadAll();
+}
bool CSectionLoader::IsLoaded(const CStdString& strSection)
{
diff --git a/xbmc/SectionLoader.h b/xbmc/SectionLoader.h
index b7f68cbe9b..0a8c18c410 100644
--- a/xbmc/SectionLoader.h
+++ b/xbmc/SectionLoader.h
@@ -55,13 +55,16 @@ public:
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)