Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] (PR#2365) gui-gtk: free_sprite doesn't free mask
Home

[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]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#2365) gui-gtk: free_sprite doesn't free mask
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 29 Nov 2002 01:20:15 -0800
Reply-to: rt@xxxxxxxxxxxxxx

[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

Attachment: free_sprite-2.diff
Description: free_sprite-2.diff


[Prev in Thread] Current Thread [Next in Thread]