fix memleak

This commit is contained in:
Glenn Maynard
2004-07-13 06:47:37 +00:00
parent 8532a2c337
commit 1c5e411bf9
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -38,6 +38,16 @@ int32_t RageSurfacePalette::FindClosestColor( const RageSurfaceColor &color ) co
return iBest;
}
RageSurfaceFormat::RageSurfaceFormat()
{
palette = NULL;
}
RageSurfaceFormat::~RageSurfaceFormat()
{
delete palette;
}
void RageSurfaceFormat::GetRGB( uint32_t val, uint8_t *r, uint8_t *g, uint8_t *b ) const
{
if( BytesPerPixel == 1 )
+3
View File
@@ -26,6 +26,9 @@ struct RageSurfacePalette
struct RageSurfaceFormat
{
RageSurfaceFormat();
~RageSurfaceFormat();
int32_t BytesPerPixel;
int32_t BitsPerPixel;
uint32_t Rmask, Gmask, Bmask, Amask;