From a11a31ff78af62e73735b5e012849523a612e26a Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 5 Aug 2002 17:50:25 +0000 Subject: Range check Fl_Text_Buffer::search_forward(). Don't use png_read_destroy() - it doesn't free all memory. Add uncache() method to image classes. Memory/initialization bugs in Fl_File_Chooser (valgrind) Make sure both Fl_Window constructors have default cursor initialization code... git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2562 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Bitmap.cxx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/Fl_Bitmap.cxx') diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index f7a254dd7..2355cd91a 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.15 2002/04/26 11:32:37 easysw Exp $" +// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.16 2002/08/05 17:50:24 easysw Exp $" // // Bitmap drawing routines for the Fast Light Tool Kit (FLTK). // @@ -384,10 +384,17 @@ void Fl_Bitmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) { } Fl_Bitmap::~Fl_Bitmap() { - if (id) fl_delete_bitmask(id); + uncache(); if (alloc_array) delete[] (uchar *)array; } +void Fl_Bitmap::uncache() { + if (id) { + fl_delete_bitmask(id); + id = 0; + } +} + void Fl_Bitmap::label(Fl_Widget* w) { w->image(this); } @@ -466,5 +473,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) { // -// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.15 2002/04/26 11:32:37 easysw Exp $". +// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.16 2002/08/05 17:50:24 easysw Exp $". // -- cgit v1.2.3