Werner Hauptfleisch wrote: > Does anyone know what the reason for this would be. I am freeing all > instances of StringLists and would expect this to release the files > aswell, but it seems it does not? Is there something else I should do > to release a file used by a StringList? I also note that the memory on > the particular process continue to increase as files are received, > stored and processed and think this is related to the StringLists. I've seen error messages like these on Windows, and they never had anything to do with "Too many open files". It seems like, when Windows resources of any sort get low, it just pulls an error message out of a hat... :) . Seriously, though, if you want to learn more about TStringList, just look at the Delphi source.
LoadFromFile just creates a TFileStream, reads from it, then frees the stream. SaveToFile does the exact same thing, except saves to the file instead. The file is closed as soon as the LoadFromFile/SaveToFile methods complete, so your code can't even mess this up. Your problem has nothing to do with TStringList holding files open. Cheers, Nicholas Sherlock ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ synalist-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/synalist-public
