[unixODBC-support] Memory leak in SQLFetch?

Nick Gorham nick.gorham at easysoft.com
Tue Dec 14 07:10:22 GMT 2004


Craddock, Richard C wrote:

> Ladies and Gentlemen:
>
>  
>
> I have a reproducible memory leak with the attached code.  There are 
> exactly 20160 elements that should be returned from the query.  After 
> running this program there is nearly 3Mb of un-freed memory.  If I 
> comment out the SQLFetch() calls then the memory leak goes away.  I 
> suspect that it may have something to do with how I am using unixODBC 
> rather then a memory leak in unixODBC.  But I have stared at the code 
> for quite sometime to no avail.  Has anyone had a similar problem?  
> Have I made a mistake somewhere?  I appreciate your time and assistance.
>
>  
>
> Regards,
>
> Cameron Craddock
>
 From a quick read, it looks ok, but it does depend on the driver as 
well, what driver is this using ?

When you have these sorts of problems, its often worth just trying the 
same thing with another database/driver to see if the leak remains.

-- 
Nick



More information about the unixODBC-support mailing list