[Freeciv-Dev] (PR#2365) gui-gtk: free_sprite doesn't free mask
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
[jdorje - Fri Nov 29 09:03:46 2002]:
> [jdorje - Tue Nov 19 22:57:19 2002]:
>
> > The free_sprite() function in the GTK client doesn't free the sprite's
> > mask. This means a certain amount of memory leak will be unavoidable,
> > especially when switching tilesets.
>
> This is a "correct" fix. But it's a bit of a hack. It just remembers
> whether the sprite was allocated with GDK or imlib and frees it in the
> same way.
Umm, did I say "correct"? I meant "incorrect".
This patch should be "correct", though. Note there is some noise,
including the renaming of ctor_sprite_mask to alloc_sprite, making it
static, and using it in load_gfx.
jason
free_sprite-2.diff
Description: free_sprite-2.diff
|
|