<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Nicolas,<br><br>I received that report a month ago:<br><br>"we have found the OGROCISession is never
released, causing a large memory leak whenever a connection is
closed. <br>
As workaround, we added in O<tt>GROCISession::~OGROCISession()</tt><br><br>
<tt> if( hEnv )</tt><tt><br>
</tt><tt> OCIHandleFree((dvoid *) hEnv, (ub4)
OCI_HTYPE_ENV);</tt>"<br><br>But they also mention some other memory leaks without an specific location on the code.<br><br>Can you try to see if that fix the problem?<br><br>Thanks,<br><br>Ivan<br><br><br><div><hr id="stopSpelling">From: nicolas.simon@spw.wallonie.be<br>To: gdal-dev@lists.osgeo.org<br>Date: Tue, 6 May 2014 15:32:09 +0000<br>CC: christophe.sandri@spw.wallonie.be; xuan.nguyen@spw.wallonie.be<br>Subject: [gdal-dev] OGR: memory leak in OCI driver<br><br>
<style><!--
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:11.0pt;
font-family:"Calibri","sans-serif";
}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}
.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}
.ExternalClass span.ecxEmailStyle17 {
font-family:"Calibri","sans-serif";
color:windowtext;
}
.ExternalClass .ecxMsoChpDefault {
}
.ExternalClass div.ecxWordSection1 {
}
--></style>
<div class="ecxWordSection1">
<p class="ecxMsoNormal">Dear developers,</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal"> I suspect that there is a memory leak in OCI driver for OGR</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal"> My simplified test case is :</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">… </p>
<p class="ecxMsoNormal">// point A</p>
<p class="ecxMsoNormal">OGRRegisterAll();</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">// point B</p>
<p class="ecxMsoNormal">pDS = OGRSFDriverRegistrar::Open("OCI:USER/PWD@INSTANCE:TABLE", true);</p>
<p class="ecxMsoNormal">if(pDS)</p>
<p class="ecxMsoNormal"> {</p>
<p class="ecxMsoNormal"> OGRDataSource::DestroyDataSource(pDS);</p>
<p class="ecxMsoNormal"> pDS = NULL;</p>
<p class="ecxMsoNormal"> }</p>
<p class="ecxMsoNormal"> else</p>
<p class="ecxMsoNormal"> {</p>
<p class="ecxMsoNormal"> fprintf(fOut,"Erreur Open\n");</p>
<p class="ecxMsoNormal"> }</p>
<p class="ecxMsoNormal"> // point C</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">OGRCleanupAll();</p>
<p class="ecxMsoNormal">// point D</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">It appears that I lose memory between points B and C, and between point A and D
</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal"> B = A + 4 MB</p>
<p class="ecxMsoNormal"> C = A + 20 MB ( 16 MB lost)</p>
<p class="ecxMsoNormal"> D = A +19 MB ( 3 more MB lost) </p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">Test was done with GDAL 1.9 under windows (with Oracle 11g)</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">Can some one have an idea to find and fix this ?</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">Thank you</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">By the way, I received « TICKET_CREATE privileges are required to perform this operation » when I tried to make a ticket (UID nicsim)</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal">Nicolas</p>
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal"> </p>
</div>
<br>_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev</div> </div></body>
</html>