On 30-3-2010 9:28, Michael Van Canneyt wrote: > After allocating an object which you will free in the same routine, > you should ALWAYS put a try..finally statement, and free the object in > the > finally clause: ++ makes sense. > After that, the error still happens, but at least there is no memory > leak. > > The error is the following: > > FreeAndNil(Item); //Don't really now if we should do this but it > can't hurt. Can it? > > It CAN hurt: TSearchRec is a record, you don't need to free it. ++Ok, clear. > > Michael.
Michael, Thanks for the quick & clear explanation! I'll give it a go and get back to the list if (when ;) I've got more problems... jb _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal