diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-12-13 14:36:24 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-12-13 20:35:43 +0000 |
commit | 570da8fd4a341a7e5606bb703efeac373418639e (patch) | |
tree | 5bc1ad7b23cd09bb93ae7989cb3ba47d9c2c568f | |
parent | dbc4b25f55bc5363ca26782439215f14ff097951 (diff) |
release fontconfig on exit
-rw-r--r-- | vcl/unx/source/fontmanager/fontconfig.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx index 1de85367c39d..fb071bb60e89 100644 --- a/vcl/unx/source/fontmanager/fontconfig.cxx +++ b/vcl/unx/source/fontmanager/fontconfig.cxx @@ -99,6 +99,7 @@ class FontCfgWrapper int m_nFcVersion; FcBool (*m_pFcInit)(); + void (*m_pFcFini)(); int (*m_pFcGetVersion)(); FcConfig* (*m_pFcConfigGetCurrent)(); FcObjectSet* (*m_pFcObjectSetVaBuild)(const char*,va_list); @@ -152,6 +153,9 @@ public: FcBool FcInit() { return m_pFcInit(); } + void FcFini() + { if (m_pFcFini) m_pFcFini(); } + int FcGetVersion() { return m_pFcGetVersion(); } @@ -286,6 +290,8 @@ FontCfgWrapper::FontCfgWrapper() m_pFcInit = (FcBool(*)()) loadSymbol( "FcInit" ); + m_pFcFini = (void(*)()) + loadSymbol( "FcFini" ); m_pFcGetVersion = (int(*)()) loadSymbol( "FcGetVersion" ); m_pFcConfigGetCurrent = (FcConfig *(*)()) @@ -465,6 +471,7 @@ FontCfgWrapper::~FontCfgWrapper() { if( m_pOutlineSet ) FcFontSetDestroy( m_pOutlineSet ); + FcFini(); if( m_pLib ) osl_unloadModule( (oslModule)m_pLib ); } |