Add missing delete statements in ~Fl_XXX_Copy_Surface_Driver() and ~Fl_XXX_Image_Surface_Driver().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2016-08-24 08:53:29 +00:00
parent f07570e92f
commit 4180cf5360
6 changed files with 6 additions and 0 deletions

View File

@ -3321,6 +3321,7 @@ Fl_Quartz_Copy_Surface_Driver::~Fl_Quartz_Copy_Surface_Driver()
CFRelease(pdfdata);
[clip setData:[image TIFFRepresentation] forType:TIFF_pasteboard_type];
[image release];
delete driver();
}
////////////////////////////////////////////////////////////////

View File

@ -81,6 +81,7 @@ Fl_GDI_Copy_Surface_Driver::~Fl_GDI_Copy_Surface_Driver() {
}
DeleteDC(gc);
Fl_Surface_Device::surface()->driver()->gc(oldgc);
delete driver();
}

View File

@ -59,6 +59,7 @@ Fl_GDI_Image_Surface_Driver::Fl_GDI_Image_Surface_Driver(int w, int h, int high_
Fl_GDI_Image_Surface_Driver::~Fl_GDI_Image_Surface_Driver() {
if (offscreen) DeleteObject(offscreen);
delete driver();
}

View File

@ -72,6 +72,7 @@ Fl_Quartz_Image_Surface_Driver::~Fl_Quartz_Image_Surface_Driver() {
free(data);
CGContextRelease((CGContextRef)offscreen);
}
delete driver();
}
void Fl_Quartz_Image_Surface_Driver::set_current() {

View File

@ -73,6 +73,7 @@ Fl_Xlib_Copy_Surface_Driver::~Fl_Xlib_Copy_Surface_Driver() {
Fl_X11_Screen_Driver::copy_image(data, width, height, 1);
delete[] data;
fl_delete_offscreen(xid);
delete driver();
}

View File

@ -56,6 +56,7 @@ Fl_Xlib_Image_Surface_Driver::Fl_Xlib_Image_Surface_Driver(int w, int h, int hig
Fl_Xlib_Image_Surface_Driver::~Fl_Xlib_Image_Surface_Driver() {
if (offscreen) XFreePixmap(fl_display, offscreen);
delete driver();
}
void Fl_Xlib_Image_Surface_Driver::set_current() {