Why not Free the dialog right now after use?
Dialog := TConnForm.Create(Self);
// Dialog.Free; // Why not???
procedure TMainForm.actImportCSVExecute(Sender: TObject);
// Import Textfile
Dialog := Tloaddataform.Create(Self);
Sir, you tool is very good. But sometimes(not little times), it is crashed. So I try to read your code, and I find that you don't free the dialog right now. I think "TConnForm.Create(Self);" means the instance of TConnForm is managed automatically by MainForm and will be free even you have really lost this instance. But why not free the instance right now? It is so easy.
Itherway I remember from head there are also commands like FreeAndNil
that does magic, and only way to confirm (unleas having special tools for looking for memory leaks) that it did what it should is monitoring task manager looking at mem usage.
Please login to leave a reply, or register at first.