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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to