Fix memory leaks in Image class

This commit is contained in:
manupap1 2014-11-15 12:58:08 +01:00
parent 658b9abea9
commit 9eee62c6d2
1 changed files with 16 additions and 0 deletions

View File

@ -140,6 +140,22 @@ Image::Image( const Image &p_image )
Image::~Image()
{
DumpImgBuffer();
if ( initialised )
{
delete[] y_table;
delete[] uv_table;
delete[] r_v_table;
delete[] g_v_table;
delete[] g_u_table;
delete[] b_u_table;
initialised = false;
}
if ( jpg_dcinfo )
{
jpeg_destroy_decompress( jpg_dcinfo );
delete jpg_dcinfo;
jpg_dcinfo = 0;
}
}
void Image::Initialise()