AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
February 2006

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2006.02.13 14:13 "Memory leak in TIFFOpen on Win32 ?", by Thierry Pierron
2006.02.13 15:25 "Re: Memory leak in TIFFOpen on Win32 ?", by Bernie Pallek
2006.02.13 16:05 "Re: Memory leak in TIFFOpen on Win32 ?", by Bob Friesenhahn
2006.02.13 18:50 "Re: Memory leak in TIFFOpen on Win32 ?", by Thierry Pierron

2006.02.13 14:13 "Memory leak in TIFFOpen on Win32 ?", by Thierry Pierron

Hi all,

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;
}

What I notice is that memory usage increased without going down at any 
moment. I'm using GnuWin32 v3.8.0 self-installer package on Windows 
2000, and compiled this test with MinGW. The test file can be 
downloaded from http://216.113.38.184/download/cyan.tif   (3.9M). This 
is a 10800x13200 8bits monochrome tiled TIFF file, compressed with 
deflate method and which was generated by libTIFF itself (v3.7.3).

I also run this test on Linux and Mac OS X, with sources downloaded 
from ftp, and have not seen any problem.

Does someone else notice that strange side effect ?
-- 
Thierry Pierron
Polkadots Software Inc.
2501 Dollard
Lasalle, QC
H8N 1S2 Canada