2006.01.31 10:17 "[Tiff] RowsPerStrip", by Harsha

2006.02.13 15:25 "RE: [Tiff] Memory leak in TIFFOpen on Win32 ?", by

> -----Original Message-----

> From: tiff-bounces@lists.maptools.org

> [mailto:tiff-bounces@lists.maptools.org]On Behalf Of Thierry Pierron

Just try the following code:

  #include <stdio.h>
#include <tiffio.h>

int main(int argc, char *argv[])
{
        int i;

        for (i = 10; i > 0; i --)
        {
                printf("Starting in %d ...\r", i); fflush(stdout);
                sleep(1);
        }

        for (i = 0; i < 10000; i ++)
        {
                TIFF * in = TIFFOpen("cyan.tif", "r");
                if (in) TIFFClose(in);
        }
        sleep(20);
        return 0;
}

I think someone else brought this up a few weeks ago. I guessed the problem was somewhere in the TIFFClose chain of processing, as that's what should be freeing the memory. You might want to trace through it to see if it ever really reaches a point where memory is freed.