@rnfpc: in your 1st post you show a lot of free-statements. Because you created all 'TLineseries' with owner 'Chart1', they will be automatically freed at the time, when 'Chart1' is freed. So it is not neccessary, that you free them manually. Except if you would want to free these 'TLineseries' for the goal, to re-create them again afterwards, without freeing 'Chart1'. Same story for 'TextMemo' which has owner 'abgform'. But this should not be the reason for your memory leak.
I'm only a beginner to valgrind. I would recommend to use it's parameter '--leak-check=full'. This should show memory leaks as messages of this type:
520 bytes in 13 blocks are definitely lost in loss record 8,631 of 9,037However I got for my program 22 complaints of this style, but 21 of them did not contain even 1 line of my sources. So maybe you have to check an extensive output...
Of course valgrind needs that you compile your program with option -gv.
I have following code to create various forms in myproject.lpr file:
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(TForm3, Form3);
Application.CreateForm(TForm4, Form4);
Application.CreateForm(TForm5, Form5);
Application.Run;
end.
Do I need to free them manually at time of exit from program?
No, because they are created with owner 'Application'. They all will be freed automatically, when your program terminates, when 'Application' is freed.