At 12:18 PM 8/9/2011 -0400, you wrote: >I've got an inherited app that processes flat files--some big ones >too---and I'm looking for areas to clear out memory because after I >process one file, it then chokes on the ALINES line for subsequent runs >says "There is not enough memory to complete this operation." > >Here's the line: IF ALINES(aChunks,FILETOSTR(This.InputFile)) > 0
Would you be willing to send several of the files over? This is perplexing. I do a lot of file reading like this (to frequently speed up working with XML files - ugh). I'm wondering why you'd be getting this problem. One other thing to try would be to read the file into a string variable first then do an alines on the string variable. You could release the variable right after the ALINES(). That may give a little more control of memory release. I'm not exactly sure how VFP would handle the single-line code above. It'd have to buffer the FILETOSTR() somewhere - and not sure how/when that'd be released (maybe CLEAR MEMORY, but that's the whole kit-n-kaboodle). -Charlie _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

