summaryrefslogtreecommitdiff
path: root/pango/pangowin32-fontcache.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2002-11-12 04:11:02 +0000
committerTor Lillqvist <tml@src.gnome.org>2002-11-12 04:11:02 +0000
commitceaeb6f33f43a9efe31e6549b3aad3d4a88a03e9 (patch)
treed4afe5480b77cca6cd6b743238b3634ffc5d893f /pango/pangowin32-fontcache.c
parent23c23546a22a785be7eca60f4bc59f7723456ffe (diff)
downloadpango-ceaeb6f33f43a9efe31e6549b3aad3d4a88a03e9.tar.gz
Add more debugging output.
2002-11-12 Tor Lillqvist <tml@iki.fi> * pango/pangowin32-fontcache.c (free_cache_entry, cache_entry_unref, pango_win32_font_cache_load): Add more debugging output. * modules/basic/basic-win32.c (uniscribe_shape): Plug memory leak: Free return value from pango_win32_font_logfont(). Call pango_win32_font_cache_unload() for the hfont returned from pango_win32_font_cache_load() after using it.
Diffstat (limited to 'pango/pangowin32-fontcache.c')
-rw-r--r--pango/pangowin32-fontcache.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/pango/pangowin32-fontcache.c b/pango/pangowin32-fontcache.c
index 9d8db725..8b07f492 100644
--- a/pango/pangowin32-fontcache.c
+++ b/pango/pangowin32-fontcache.c
@@ -57,7 +57,8 @@ free_cache_entry (LOGFONT *logfont,
CacheEntry *entry,
PangoWin32FontCache *cache)
{
- DeleteObject (entry->hfont);
+ if (!DeleteObject (entry->hfont))
+ PING (("DeleteObject for hfont %p failed", entry->hfont));
g_free (entry);
}
@@ -144,6 +145,8 @@ cache_entry_unref (PangoWin32FontCache *cache,
entry->ref_count--;
if (entry->ref_count == 0)
{
+ PING (("removing cache entry %p", entry->hfont));
+
g_hash_table_remove (cache->forward, &entry->logfont);
g_hash_table_remove (cache->back, entry->hfont);
@@ -181,6 +184,7 @@ pango_win32_font_cache_load (PangoWin32FontCache *cache,
if (entry)
{
entry->ref_count++;
+ PING (("increased refcount for cache entry %p: %d", entry->hfont, entry->ref_count));
}
else
{
@@ -233,7 +237,7 @@ pango_win32_font_cache_load (PangoWin32FontCache *cache,
if (hfont != NULL)
{
- PING (("Success!"));
+ PING (("Success! hfont=%p", hfont));
break;
}