gpu renderer: cached textures are never freed
It looks like the implementation of caching is somewhat incomplete.
I see code in gsk_gpu_cached_texture_destroy_cb:
texture_still_alive = g_atomic_pointer_exchange (&self->texture, NULL) != NULL;
if (!texture_still_alive)
{
g_free (self);
}
This gets called when the render data is cleared (which does happen when the GdkTexture goes away).
But nothing ever clears self->texture. Maybe the weakref was meant to be a g_weak_pointer?
Edited by Matthias Clasen