summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog11
-rw-r--r--ChangeLog.pre-1-1011
-rw-r--r--ChangeLog.pre-1-211
-rw-r--r--ChangeLog.pre-1-411
-rw-r--r--ChangeLog.pre-1-611
-rw-r--r--ChangeLog.pre-1-811
-rw-r--r--modules/basic/basic-win32.c16
-rw-r--r--pango/pangowin32-fontcache.c8
8 files changed, 86 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f98aab48..b7a3c53b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index f98aab48..b7a3c53b 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index f98aab48..b7a3c53b 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index f98aab48..b7a3c53b 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index f98aab48..b7a3c53b 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index f98aab48..b7a3c53b 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,14 @@
+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.
+
Fri Nov 8 20:02:09 2002 Soeren Sandmann <sandmann@daimi.au.dk>
* docs/tmpl/coverage-maps.sgml:
diff --git a/modules/basic/basic-win32.c b/modules/basic/basic-win32.c
index f2dedd98..1b5cf8b2 100644
--- a/modules/basic/basic-win32.c
+++ b/modules/basic/basic-win32.c
@@ -835,7 +835,8 @@ uniscribe_shape (PangoFont *font,
int wlen, i;
gboolean retval = TRUE;
GError *error;
- HGDIOBJ old_font;
+ HGDIOBJ old_font = NULL;
+ HFONT hfont = NULL;
LOGFONT *lf;
SCRIPT_CACHE script_cache[100];
@@ -847,7 +848,15 @@ uniscribe_shape (PangoFont *font,
wlen /= 2;
lf = pango_win32_font_logfont (font);
- old_font = SelectObject (hdc, pango_win32_font_cache_load (font_cache, lf));
+ hfont = pango_win32_font_cache_load (font_cache, lf);
+ g_free (lf);
+
+ if (hfont == NULL)
+ retval = FALSE;
+
+ if (retval)
+ old_font = SelectObject (hdc, hfont);
+
if (old_font == NULL)
{
#ifdef BASIC_WIN32_DEBUGGING
@@ -887,6 +896,9 @@ uniscribe_shape (PangoFont *font,
if (old_font != NULL)
SelectObject (hdc, old_font);
+ if (hfont != NULL)
+ pango_win32_font_cache_unload (font_cache, hfont);
+
return retval;
}
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;
}