AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2005.12.14 16:38 "[Tiff] CVS libtiff, new problem", by Bob Friesenhahn
[...]
2006.01.30 06:18 "[Tiff] TIFFClose(var) doesnt release memory", by Pradeep Bala
2006.01.30 15:24 "Re: [Tiff] TIFFClose(var) doesnt release memory", by Bob Friesenhahn
[...]

2006.01.30 15:24 "Re: [Tiff] TIFFClose(var) doesnt release memory", by Bob Friesenhahn

According to the manual for TIFFClose() -- memory should be released but I it.., can someone point out why? dont see

You are leaking the image returned by TIFFOpen() due to a missing TIFFClose(image) before the continue statement.

Bob

Thanks in advance!

/**** CODE FOLLOWS *****/

TIFF *image;

while( listof_files < totalfiles )

    {

            if((image = TIFFOpen(s.c_str(), "r")) == NULL)

            {

                // BAD TIFF IMAGE

                listof_files++;

                 continue;

            }
            else
            {

                // GOOD TIFF IMAGE

                listof_files++;

             }

              TIFFClose(image);

      }

======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer, http://www.GraphicsMagick.org/