[fpc-pascal]Interesting Ansistring issues

Peter Vreman peter at freepascal.org
Thu Aug 16 11:03:48 CEST 2001

> Hey all,
>    Quick question... are there any known issues with reading an writing lots of
in a record to and from a text file?  Reason for the question is because I am trying to do
just that... but for some reason after it makes a certain amount of reads and writes it
gives me some majorly corrupt memory and gives me a runtime error 216 (GPF)
> My first thought was that it was my fault (lots of lines of code in this unit) so i went
through it with a fine-tooth comb and every single file i opened is closed, every pointer
i allocate is freed, etc.  The only thing is, since an Ansistring is a pointer... how do I
free that memory?  Because none of the pointer routines seem to work on them. (Gives me
type mismatches)

You can free the memory by assigning an empty string "ansistring:='';"

> Oh yeah.. i also went and downloaded the latest snapshot (1.1) and still no luck.
> Any ideas?

Maybe when you can isolate the problem and mail the required code we can test things. But
only from a description that there are possible memoryleaks with ansistrings we can't give
any reasonable ideas.

More information about the fpc-pascal mailing list