Permalink
Browse files

Merge pull request #223 from Memphiz/master

fix for dyloaded libs getting unloaded to early on app exit
  • Loading branch information...
2 parents acdc0dd + 3973494 commit e396f5bd7ca9d78d7551c4dbb9ef461a72315ed7 @Memphiz Memphiz committed Jun 29, 2011
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
@@ -3133,7 +3133,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 e396f5b

Please sign in to comment.