[fpc-pascal] string memory management

Sven Barth pascaldragon at googlemail.com
Fri Apr 19 09:57:57 CEST 2013

Am 19.04.2013 09:38, schrieb Xiangrong Fang:
> 2013/4/19 Michael Van Canneyt <michael at freepascal.org 
> <mailto:michael at freepascal.org>>
>     1. I don't know whether I have to MANUALLY free memory for these
>     strings to
>             prevent leak?
>     Yes, if you work like this, you must do all that. You must free
>     all pointers in the list, and the strings they point to.
>     But why not use TStringList ? It does all this for you.
> Because I want to then concat the strings into a big string using 
> CRLF, but the TStringList.Text method concat them using LF only. I 
> think that might be platform dependant, which is not what I want.
It seems that TextLineBreakStyle is what you want: 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130419/475dd85f/attachment.html>

More information about the fpc-pascal mailing list