[Gdal-dev] Memory Leaks

Ned Harding nharding at extendthereach.com
Tue Aug 30 11:18:05 EDT 2005


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.

2 functions allocate memory that never get free'd again.

CPLGetErrorContext
CPLGetTLSList

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.

Ned Harding
Chief Technology Officer
SRC - Extending the Reach of Micromarketing
3825 Iris Ave Suite 150
Boulder, CO 80303
(303) 440-8896 x104

http://www.extendthereach.com

Technology in Action:

http://www.DemographicsNow.com





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20050830/98485acb/attachment.html


More information about the Gdal-dev mailing list