Memoryleak in SQLite3db.TSqlite?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Memoryleak in SQLite3db.TSqlite?

Michael Fuchs-5
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Memoryleak in SQLite3db.TSqlite?

Michael Fuchs-5
Am 16.10.2012 12:59, 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

Michael
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Memoryleak in SQLite3db.TSqlite?

Michael Fuchs-5
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?
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Memoryleak in SQLite3db.TSqlite?

Michael Van Canneyt


On Mon, 11 Mar 2013, Michael Fuchs wrote:

> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Memoryleak in SQLite3db.TSqlite?

Michael Fuchs-6
Am 11.03.2013 16:27, schrieb Michael Van Canneyt:
>> Can anybody apply this patch to the trunk?
>
> Done.

Thank you.


Michael

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal