Set flag so that destructor will free memory used by PNM images.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2668 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2002-10-11 02:30:20 +00:00
parent 5d4b4d571b
commit 1907ad9473
2 changed files with 6 additions and 3 deletions
+2
View File
@@ -1,5 +1,7 @@
CHANGES IN FLTK 1.1.1
- Fl_PNM_Image didn't set the "alloc" flag for the data,
which could lead to a memory leak.
- fl_filename_match() was inconsistently doing case-
insensitive matching.
- Fl_Button redraw fix for bug #620979 (focus boxes and
+4 -3
View File
@@ -1,5 +1,5 @@
//
// "$Id: Fl_PNM_Image.cxx,v 1.1.2.9 2002/09/17 20:27:18 easysw Exp $"
// "$Id: Fl_PNM_Image.cxx,v 1.1.2.10 2002/10/11 02:30:20 easysw Exp $"
//
// Fl_PNM_Image routines.
//
@@ -119,7 +119,8 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
// printf("%s = %dx%dx%d\n", name, w(), h(), d());
array = new uchar[w() * h() * d()];
array = new uchar[w() * h() * d()];
alloc_array = 1;
// Read the image file...
for (y = 0; y < h(); y ++) {
@@ -175,5 +176,5 @@ Fl_PNM_Image::Fl_PNM_Image(const char *name) // I - File to read
//
// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.9 2002/09/17 20:27:18 easysw Exp $".
// End of "$Id: Fl_PNM_Image.cxx,v 1.1.2.10 2002/10/11 02:30:20 easysw Exp $".
//