diff options
author | louis <louis.braun@gmx.de> | 2015-06-18 10:21:43 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2015-06-18 10:21:43 +0200 |
commit | a0a6e21d5a7e2ff3097bd851623cf1eef3daf431 (patch) | |
tree | c66a3986061a6c73f747418f94ec78008876dd41 /libcore/fontmanager.h | |
parent | bbe8c56fcb7890f43828a41363b9930ed4a2978d (diff) | |
download | vdr-plugin-skindesigner-a0a6e21d5a7e2ff3097bd851623cf1eef3daf431.tar.gz vdr-plugin-skindesigner-a0a6e21d5a7e2ff3097bd851623cf1eef3daf431.tar.bz2 |
fixed memory leak when creating fonts
Diffstat (limited to 'libcore/fontmanager.h')
-rw-r--r-- | libcore/fontmanager.h | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/libcore/fontmanager.h b/libcore/fontmanager.h index 5661c2b..1dbdcde 100644 --- a/libcore/fontmanager.h +++ b/libcore/fontmanager.h @@ -11,27 +11,28 @@ using namespace std; class cFontManager { - private: - static cMutex mutex; - map < string, map< int, cFont* > > fonts; - cFont *CreateFont(string name, int size); - void InsertFont(string name, int size); - cFont *GetFont(string name, int size); - int GetFontHeight(const char *name, int height, int charWidth = 0); - public: - cFontManager(); - ~cFontManager(); - void Lock(void) { mutex.Lock(); }; - void Unlock(void) { mutex.Unlock(); }; - void CacheFonts(cTemplate *tpl); - void DeleteFonts(void); - int Width(string fontName, int fontSize, const char *text); - int Height(string fontName, int fontSize); - cFont *Font(string fontName, int fontSize); - cFont *FontUncached(string fontName, int fontSize); - void Debug(void); - void ListAvailableFonts(void); - bool FontInstalled(string fontName); +private: + static cMutex mutex; + map < string, map< int, cFont* > > fonts; + cFont *CreateFont(string name, int size); + void InsertFont(string name, int size); + bool FontExists(string name, int size); + cFont *GetFont(string name, int size); + int GetFontHeight(const char *name, int height, int charWidth = 0); +public: + cFontManager(); + ~cFontManager(); + void Lock(void) { mutex.Lock(); }; + void Unlock(void) { mutex.Unlock(); }; + void CacheFonts(cTemplate *tpl); + void DeleteFonts(void); + int Width(string fontName, int fontSize, const char *text); + int Height(string fontName, int fontSize); + cFont *Font(string fontName, int fontSize); + cFont *FontUncached(string fontName, int fontSize); + void Debug(void); + void ListAvailableFonts(void); + bool FontInstalled(string fontName); }; #endif //__FONTMANAGER_H
\ No newline at end of file |