[fpc-pascal] More memory leaks and other problems: request for review of probably stupid mistake

2010-03-31 Thread Jim
Hi all, I'm trying to learn FreePascal by writing a file indexer a la locate and I'm hitting more walls after receiving quick and clear help from Michael Van Canneyt regarding memory leaks. In the last couple of hours I've seen memory leaks cropping up in the main LPR file, invalid pointer

Re: [fpc-pascal] More memory leaks and other problems: request for review of probably stupid mistake

2010-03-31 Thread José Mejuto
Hello FPC-Pascal, Wednesday, March 31, 2010, 7:52:43 PM, you wrote: J I'm trying to learn FreePascal by writing a file indexer a la locate and J I'm hitting more walls after receiving quick and clear help from Michael J Van Canneyt regarding memory leaks. [...] J Call trace for block

Re: [fpc-pascal] More memory leaks and other problems: request for review of probably stupid mistake

2010-03-31 Thread Flávio Etrusco
If you still want to use records, before the Dispose(APResultRecord) set the ansistring fields to '', this will garantee that the reference is freed. Or call Finalize() on them. Flávio ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] More memory leaks and other problems: request for review of probably stupid mistake

2010-03-31 Thread Jim
On 31-3-2010 20:47, Flávio Etrusco wrote: If you still want to use records, before the Dispose(APResultRecord) set the ansistring fields to '', this will garantee that the reference is freed. Or call Finalize() on them. Flávio Thanks José Flávio, Sounds like a good plan, though