Sign in Join

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

Mailing lists / fpc-pascal / 2010-09

Request for a look at sqldb Firebird database code

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Jim

Hi all,

Still wrestling with my locate clone at (download source+exe) http://bitbucket.org/jb/flocate/get/tip.zip

I've hit some interesting behaviour: running 64 bit embedded Firebird with 64 bit fpc lead to unhandled exceptions in the Firebird dll, see: http://mantis.freepascal.org/view.php?id=17360

So, I struggled on with 32 bit fpc/Firebird.
I use a TObjectlist to store file info:
see earlier post titled
TObjectList works; TFPObjectList gives memory leaks:

Show quoted text 13 lines
Each search for files creates a TObjectList descendant (TDirectoryEntryList, see directoryentrylist.pp) On finding a file, the search class createa a DirectoryEntry object with the relevant file properties and adds this to the directoryentrylist. Finally, I iterate through the list and store the results in a database. Then I try to destroy the directoryentrylist, and the directoryentry items get deleted by the Tobjectlist code. This works using a TObjectList; however when I use a TFPObjectList for TDirectoryEntryList, I have a memory leak of exactly all files/objects found that were not released.

Got some help and advice to file a bug if a simplified case led to the same error.
It turns out that removing my database code in flocatedb fixed my problems with TFPObjectlist.

I suspect my newb skills have lead me to write some nasty buggy database code.

Would some kind soul review it and give some hints? Of course, comments on other parts of the code are welcome, too...

Thanks,

Regards, jb