<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>Memory Leaks</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>I am trying to clear out all my memory leaks in a project I have. I have 2 memory leaks in OGR that I can't figure out. These are minor, but I'd still rather not have any leaks since this code can be used for a server process that is expected to live for a long time.</FONT></P>
<P><FONT SIZE=2>2 functions allocate memory that never get free'd again.</FONT>
</P>
<P><FONT SIZE=2>CPLGetErrorContext</FONT>
<BR><FONT SIZE=2>CPLGetTLSList</FONT>
</P>
<P><FONT SIZE=2>In a single threaded app, these wouldn't be much of an issue because it would happen once and that's the end of it. In my app in particular, I create a new thread to run a background process in and then the thread ends and goes away when its done. I don't see any way to clear up this thread specific data at the end of processing. Any ideas? It would be especially nice if there was a way to reference count this data based on OGR objects that require it so that nothing special needs to be called to free it, but a cleanup function would work as well.</FONT></P>
<P><FONT SIZE=2>Ned Harding</FONT>
<BR><FONT SIZE=2>Chief Technology Officer</FONT>
<BR><FONT SIZE=2>SRC - Extending the Reach of Micromarketing</FONT>
<BR><FONT SIZE=2>3825 Iris Ave Suite 150</FONT>
<BR><FONT SIZE=2>Boulder, CO 80303</FONT>
<BR><FONT SIZE=2>(303) 440-8896 x104</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://www.extendthereach.com" TARGET="_blank">http://www.extendthereach.com</A></FONT>
</P>
<P><FONT SIZE=2>Technology in Action:</FONT>
</P>
<P><FONT SIZE=2><A HREF="http://www.DemographicsNow.com" TARGET="_blank">http://www.DemographicsNow.com</A></FONT>
</P>
<BR>
<BR>
<BR>
<BR>
</BODY>
</HTML>