[fpc-pascal] Re: PChar -> AnsiString -> PChar = memory leak?
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Oct 29 14:08:47 CET 2009
The reason why I'm not sure, is because I created a simple console
test application. Initially, running the program, I got the correct
output. Then I thought I would enable 'heaptrc' (-gh compiler
parameter) to make sure I am not leaking memory in the application.
Now with heaptrc enabled, I get some strange output.. :-(
So now I'm confused.
---- with heaptrc enabled------------------------
$ ./project1
t=hello
Text=hello
Text=������������ᆳ
Heap dump by heaptrc unit
20 memory blocks allocated : 608/632
20 memory blocks freed : 608/632
0 unfreed memory blocks : 0
True heap size : 131072
True free heap : 131072
---- Without heaptrc enabled------------------------
tmp $ ./project1
t=hello
Text=hello
Text=hello world
I'm using FPC 2.3.1 (latest revision) using 64bit Linux.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list