> In my experience, most "memory leaks" detected by Visual Studio are
> harmless. They're usually some block of memory grabbed just once by the
> program at startup, and never formally released. There's no point in
> chasing these. You'd have to add extra code to the library to allow for
> a formal shutdown, which would have no other effect than to make the
> leak checker happy.
> I could be wrong about this. To find out, try changing the example to
> issue multiple queries, or change resetdb to insert more data. If
> either of these things increases the size of the leak, it's probably
> something to worry about. Otherwise, it's just the sort of static leak
> I describe above.
Well, I've tried with a lot of queries, even with no line in the main body, and the
result is the
same leak memory blocks, so it seems you're right.