Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-10

Memoryleak in SQLite3db.TSqlite?

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Fuchs

Hello,

I wrote a simple test program with SQLite3db

program SqliteMemoryLeak;
{$mode objfpc}{$H+}

uses
HeapTrc, {$IFDEF UNIX}{$IFDEF UseCThreads}CThreads,{$ENDIF}{$ENDIF}

   Classes, SysUtils, SQLite3db;
var
   X: TSQLite;
   S: TStringList;
begin
   try
     S := TStringList.Create;
     X := TSqlite.Create('test.sqlite');
     X.Query('SELECT * FROM FIRM', S);
   finally
     FreeAndNil(X);
     FreeAndNil(S);
   end;
end.

It works, but the heap trace shows a bunch of memory leaks. The trace could be found under:
http://michael-fuchs.net/newsgroups/fpc-pascal/sqlitememoryleak.trc

Even this produces an unfreed memory message:

begin
   try
     X := TSqlite.Create('test.sqlite');
   finally
     FreeAndNil(X);
   end;
end.

Is this a bug or am I doing something wrong?

Michael

Reply by email

Michael Van Canneyt
to Michael Fuchs
Michael Fuchs wrote 14 lines
Am 31.10.2012 10:54, schrieb Michael Fuchs: >> It works, but the heap trace shows a bunch of memory leaks. >> ... >> Is this a bug or am I doing something wrong? > > For information: I created an entry in the bug tracker for this problem: > > http://bugs.freepascal.org/view.php?id=23247 Hello, I found no possibility to contact a person via Mantis. Can anybody apply this patch to the trunk?

Done.

Michael.

Reply by email