Return-Path: <tiff-bounces@lists.maptools.org>
Received: from inas020.isp.belgacom.be (localhost [127.0.0.1])
        by inav011.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AV-3.00) with ESMTP id k0UDXAHv025666
        for <joris.at.lebbeke@skynet.be>; Mon, 30 Jan 2006 14:33:10 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from inmx016.isp.belgacom.be (inmx016.isp.belgacom.be [195.238.4.219])
        by inas020.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-AS-2.03) with ESMTP id k0UDX1C5010077
        for <joris.at.lebbeke@skynet.be>; Mon, 30 Jan 2006 14:33:02 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (r153.dmsolutions.ca [209.217.116.153] (may be forged))
        by inmx016.isp.belgacom.be (8.12.11/8.12.11/Skynet-IN-2.32) with ESMTP id k0UDWnmU009576
        for <joris.at.lebbeke@skynet.be>; Mon, 30 Jan 2006 14:32:50 +0100
        (envelope-from <tiff-bounces@lists.maptools.org>)
Received: from duke.maptools.org (duke.maptools.org [127.0.0.1])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k0UDIQb5026545;
	Mon, 30 Jan 2006 08:18:54 -0500
Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.198])
	by duke.maptools.org (8.12.11/8.12.10) with ESMTP id k0U6I7wC012544
	for <tiff@lists.maptools.org>; Mon, 30 Jan 2006 01:18:07 -0500
Received: by uproxy.gmail.com with SMTP id j3so524531ugf
	for <tiff@lists.maptools.org>; Sun, 29 Jan 2006 22:18:05 -0800 (PST)
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com;
	h=received:message-id:date:from:to:subject:mime-version:content-type;
	b=LjsDDPHBMWIw7GafbjNpyfltGAh/otvX7lesKReQlWBXneufKvAexFKlxCLTeHbJiZlIFb9lWp43sDaMBp3C3a+MVirpK9RyEjQLd2M0VoTzf5+COxHWFdNUIjz1i3gL1v+7x8CBVgRIogBwr2xriYrwcDPEq2rHvs0HRykl5Yg=
Received: by 10.49.9.7 with SMTP id m7mr694407nfi;
	Sun, 29 Jan 2006 22:18:04 -0800 (PST)
Received: by 10.49.40.4 with HTTP; Sun, 29 Jan 2006 22:18:04 -0800 (PST)
Message-ID: <9b1a2a9d0601292218l224271c4ga9b7a8c78a9cf529@mail.gmail.com>
Date: Mon, 30 Jan 2006 00:18:04 -0600
From: Pradeep Bala <pradeepcbala@gmail.com>
To: tiff@lists.maptools.org
MIME-Version: 1.0
X-Mailman-Approved-At: Mon, 30 Jan 2006 08:18:24 -0500
Subject: [Tiff] TIFFClose(var) doesnt release memory
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.4
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0868868012=="
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org
X-UIDL: 000000000023ceae.00001202
X-MSP-STORE: Mon, 30 Jan 2006 14:33:18 +0100
Status:   

--===============0868868012==
Content-Type: multipart/alternative; 
	boundary="----=_Part_5737_27527317.1138601884741"

------=_Part_5737_27527317.1138601884741
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I ran the following code on
WinXP Pro - AMD athlon 1.1Ghz and 1 GB RAM Machine., VStudio 6.0

I dont see TIFFClose(image) release memory back to the system.
As I kept checking the RAM taken by this program it kept on increasing and
never decreased

Is it possible to make sure that the memory is released back to the system =
?

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


Thanks in advance !


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

 TIFF *image;

while( listof_files < totalfiles )
    {
            if((image =3D TIFFOpen(s.c_str(), "r")) =3D=3D NULL)
            {
                // BAD TIFF IMAGE
               listof_files++;
                 continue;

            }
            else
            {
                // GOOD TIFF IMAGE
                listof_files++;
             }
              TIFFClose(image);

      }

------=_Part_5737_27527317.1138601884741
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<br>
<br>
I ran the following code on <br>
WinXP Pro - AMD athlon 1.1Ghz and 1 GB RAM Machine., VStudio 6.0<br>
<br>
I dont see TIFFClose(image) release memory back to the system.<br>
As I kept checking the RAM taken by this program it kept on increasing and =
never decreased<br>
<br>
Is it possible to make sure that the memory is released back to the system =
?<br>
<br>
According to the manual for TIFFClose() -- memory should be released but I =
dont see it.., can someone point out why ?<br>
<br>
<br>
Thanks in advance !<br>
<br>
<br>
/**** CODE FOLLOWS *****/<br>
<br>
&nbsp;TIFF *image;<br>
<br>
while( listof_files &lt; totalfiles )<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if((imag=
e =3D TIFFOpen(s.c_str(), &quot;r&quot;)) =3D=3D NULL)<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
 // BAD TIFF IMAGE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; listof_files++;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp; continue;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; else<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
 // GOOD TIFF IMAGE<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=
 listof_files++;<br>
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; TIFFClose(i=
mage);<br>
<br>
&nbsp; &nbsp;&nbsp;&nbsp; }<br>
<br>
<br>

------=_Part_5737_27527317.1138601884741--

--===============0868868012==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0868868012==--
