forked from AuroraMiddleware/gtk
glyphcache: Don't leak hashtables
This commit is contained in:
parent
05ca772631
commit
3a49c0eb2f
@ -386,14 +386,15 @@ gsk_gl_glyph_cache_begin_frame (GskGLGlyphCache *self)
|
|||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
GlyphCacheKey *key;
|
GlyphCacheKey *key;
|
||||||
GskGLCachedGlyph *value;
|
GskGLCachedGlyph *value;
|
||||||
GHashTable *removed = g_hash_table_new (g_direct_hash, g_direct_equal);
|
GHashTable *removed;
|
||||||
|
|
||||||
self->timestamp++;
|
self->timestamp++;
|
||||||
|
|
||||||
|
|
||||||
if ((self->timestamp - 1) % CHECK_INTERVAL != 0)
|
if ((self->timestamp - 1) % CHECK_INTERVAL != 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
removed = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||||
|
|
||||||
/* look for glyphs that have grown old since last time */
|
/* look for glyphs that have grown old since last time */
|
||||||
g_hash_table_iter_init (&iter, self->hash_table);
|
g_hash_table_iter_init (&iter, self->hash_table);
|
||||||
while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *)&value))
|
while (g_hash_table_iter_next (&iter, (gpointer *)&key, (gpointer *)&value))
|
||||||
|
Loading…
Reference in New Issue
Block a user